diff options
Diffstat (limited to 'src/util/migrations/mariadb/1659921859145-premium_since_as_date.ts')
-rw-r--r-- | src/util/migrations/mariadb/1659921859145-premium_since_as_date.ts | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/src/util/migrations/mariadb/1659921859145-premium_since_as_date.ts b/src/util/migrations/mariadb/1659921859145-premium_since_as_date.ts new file mode 100644 index 00000000..de173cfe --- /dev/null +++ b/src/util/migrations/mariadb/1659921859145-premium_since_as_date.ts @@ -0,0 +1,26 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class premiumSinceAsDate1659921859145 implements MigrationInterface { + name = 'premiumSinceAsDate1659921859145' + + public async up(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(` + ALTER TABLE \`members\` DROP COLUMN \`premium_since\` + `); + await queryRunner.query(` + ALTER TABLE \`members\` + ADD \`premium_since\` datetime NULL + `); + } + + public async down(queryRunner: QueryRunner): Promise<void> { + await queryRunner.query(` + ALTER TABLE \`members\` DROP COLUMN \`premium_since\` + `); + await queryRunner.query(` + ALTER TABLE \`members\` + ADD \`premium_since\` bigint NULL + `); + } + +} |