diff --git a/db/migration/1736177572560-HousekeepingSuggestedReviews.ts b/db/migration/1736177572560-HousekeepingSuggestedReviews.ts new file mode 100644 index 0000000000..9a1a07d308 --- /dev/null +++ b/db/migration/1736177572560-HousekeepingSuggestedReviews.ts @@ -0,0 +1,20 @@ +import { MigrationInterface, QueryRunner } from "typeorm" + +export class HousekeepingSuggestedReviews1736177572560 + implements MigrationInterface +{ + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`-- sql + CREATE TABLE housekeeping_suggested_reviews ( + id INTEGER NOT NULL AUTO_INCREMENT PRIMARY KEY COMMENT "Identifier of the review", + suggestedAt TIMESTAMP DEFAULT CURRENT_TIMESTAMP COMMENT "Date where the review was suggested", + objectType VARCHAR(255) NOT NULL UNIQUE COMMENT "Type of the object to review (e.g. 'chart', 'dataset', etc.)", + objectId CHAR(36) NOT NULL COMMENT "ID of the object to review" + ) + `) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE housekeeping_suggested_reviews`) + } +}