diff options
Diffstat (limited to '')
-rw-r--r-- | src/util/migrations/postgres/1659921826567-premium_since_as_date.ts | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/src/util/migrations/postgres/1659921826567-premium_since_as_date.ts b/src/util/migrations/postgres/1659921826567-premium_since_as_date.ts index ac1e2edb..7543ce85 100644 --- a/src/util/migrations/postgres/1659921826567-premium_since_as_date.ts +++ b/src/util/migrations/postgres/1659921826567-premium_since_as_date.ts @@ -1,26 +1,25 @@ import { MigrationInterface, QueryRunner } from "typeorm"; export class premiumSinceAsDate1659921826567 implements MigrationInterface { - name = 'premiumSinceAsDate1659921826567' + name = "premiumSinceAsDate1659921826567"; - public async up(queryRunner: QueryRunner): Promise<void> { - await queryRunner.query(` + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(` ALTER TABLE "members" DROP COLUMN "premium_since" `); - await queryRunner.query(` + await queryRunner.query(` ALTER TABLE "members" ADD "premium_since" TIMESTAMP `); - } + } - public async down(queryRunner: QueryRunner): Promise<void> { - await queryRunner.query(` + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(` ALTER TABLE "members" DROP COLUMN "premium_since" `); - await queryRunner.query(` + await queryRunner.query(` ALTER TABLE "members" ADD "premium_since" bigint `); - } - + } } |