dockerfile/examples/standardnotes/official-src/server-main/packages/auth/migrations/mysql/1630905831679-add-cancelled-flag.ts

12 lines
464 B
TypeScript
Raw Permalink Normal View History

2024-03-15 14:52:38 +08:00
import { MigrationInterface, QueryRunner } from 'typeorm'
export class addCancelledFlag1630905831679 implements MigrationInterface {
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE `user_subscriptions` ADD `cancelled` tinyint NOT NULL DEFAULT 0')
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query('ALTER TABLE `user_subscriptions` DROP COLUMN `cancelled`')
}
}