Files
dsc-api/database/migrations/1784900000000-addAttachmentsToTaskComment.ts
T
morteza af606ce9a7
Build and Deploy Docker Images / build_and_deploy (push) Has been cancelled
task manager
2026-07-25 15:48:33 +03:30

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"`);
}
}