16 lines
545 B
TypeScript
16 lines
545 B
TypeScript
import { MigrationInterface, QueryRunner } from "typeorm";
|
|
|
|
export class AddAttachmentsToTaskComment1784900000000 implements MigrationInterface {
|
|
name = "AddAttachmentsToTaskComment1784900000000";
|
|
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(
|
|
`ALTER TABLE "tm_task_comments" ADD "attachments" json NOT NULL DEFAULT '[]'`,
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.query(`ALTER TABLE "tm_task_comments" DROP COLUMN "attachments"`);
|
|
}
|
|
}
|