refactor nest app to server folder
This commit is contained in:
14
server/src/migration/1761581879633-add_admin_user.ts
Normal file
14
server/src/migration/1761581879633-add_admin_user.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddAdminUser1761581879633 implements MigrationInterface {
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
// add dev user: admin:123456
|
||||
await queryRunner.query(
|
||||
`insert into "user" ( username, email, password) values ('admin','admin@test.com','$2a$12$sT7bIBfUdAvCzcwyppSX/uVd4EP6ORgWiEg7jqXvMKJErR5jWhnmO');`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query("delete from user where username='admin'");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user