refactor nest app to server folder
This commit is contained in:
15
server/src/migration/1761571888108-add_user_table.ts
Normal file
15
server/src/migration/1761571888108-add_user_table.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddUserTable1761571888108 implements MigrationInterface {
|
||||
name = 'AddUserTable1761571888108';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "user" ("id" SERIAL NOT NULL, "username" character varying NOT NULL, "email" character varying NOT NULL, "password" character varying NOT NULL, CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`DROP TABLE "user"`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user