Skip to content

Commit

Permalink
feat: season creation migration
Browse files Browse the repository at this point in the history
  • Loading branch information
sct committed Nov 11, 2020
1 parent 1390cc1 commit 978f92a
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions server/migration/1605085519544-SeasonStatus.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class SeasonStatus1605085519544 implements MigrationInterface {
name = 'SeasonStatus1605085519544';

public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`CREATE TABLE "season" ("id" integer PRIMARY KEY AUTOINCREMENT NOT NULL, "seasonNumber" integer NOT NULL, "status" integer NOT NULL DEFAULT (1), "createdAt" datetime NOT NULL DEFAULT (datetime('now')), "updatedAt" datetime NOT NULL DEFAULT (datetime('now')), "mediaId" integer)`
);
}

public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`DROP TABLE "season"`);
}
}

0 comments on commit 978f92a

Please sign in to comment.