Update migrations
This commit is contained in:
parent
535b380636
commit
1e453fc070
1 changed files with 8 additions and 2 deletions
|
@ -1,9 +1,13 @@
|
|||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class Initial1657122167397 implements MigrationInterface {
|
||||
name = 'Initial1657122167397';
|
||||
export class Initial1657299198975 implements MigrationInterface {
|
||||
name = 'Initial1657299198975';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`CREATE TYPE "public"."update_status_enum" AS ENUM('FAILED', 'SUCCESS')`);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "update" ("id" SERIAL NOT NULL, "name" character varying NOT NULL, "status" "public"."update_status_enum" NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_6e7d7ecccdc972caa0ad33cb014" UNIQUE ("name"), CONSTRAINT "PK_575f77a0576d6293bc1cb752847" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
await queryRunner.query(
|
||||
`CREATE TABLE "user" ("id" SERIAL NOT NULL, "username" character varying NOT NULL, "password" character varying NOT NULL, "createdAt" TIMESTAMP NOT NULL DEFAULT now(), "updatedAt" TIMESTAMP NOT NULL DEFAULT now(), CONSTRAINT "UQ_78a916df40e02a9deb1c4b75edb" UNIQUE ("username"), CONSTRAINT "PK_cace4a159ff9f2512dd42373760" PRIMARY KEY ("id"))`,
|
||||
);
|
||||
|
@ -17,5 +21,7 @@ export class Initial1657122167397 implements MigrationInterface {
|
|||
await queryRunner.query(`DROP TABLE "app"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."app_status_enum"`);
|
||||
await queryRunner.query(`DROP TABLE "user"`);
|
||||
await queryRunner.query(`DROP TABLE "update"`);
|
||||
await queryRunner.query(`DROP TYPE "public"."update_status_enum"`);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue