diff --git a/db/migration/1719338980266-AddChartDiffConflictsTable.ts b/db/migration/1719338980266-AddChartDiffConflictsTable.ts new file mode 100644 index 00000000000..6d490db9e7a --- /dev/null +++ b/db/migration/1719338980266-AddChartDiffConflictsTable.ts @@ -0,0 +1,22 @@ +import { MigrationInterface, QueryRunner } from "typeorm" + +export class ChartDiffConflicts1719334981843 implements MigrationInterface { + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`-- sql + CREATE TABLE chart_diff_conflicts ( + id integer NOT NULL AUTO_INCREMENT, + chartId integer NOT NULL, + targetUpdatedAt datetime DEFAULT NULL, + updatedAt datetime NOT NULL, + conflict varchar(255) NOT NULL, + FOREIGN KEY (chartId) REFERENCES charts (id) ON DELETE CASCADE ON UPDATE CASCADE, + PRIMARY KEY (id), + INDEX (chartId) + ) + `) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE chart_diff_conflicts`) + } +}