dvbooking/server/src/migration/1761571888108-add_user_table.ts
2025-11-06 17:24:11 +01:00

16 lines
621 B
TypeScript

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"`);
}
}