diff --git a/db/migration/1736209759039-RemoveHousekeepingSuggestedReviews.ts b/db/migration/1736209759039-RemoveHousekeepingSuggestedReviews.ts new file mode 100644 index 0000000000..5c400ba2ef --- /dev/null +++ b/db/migration/1736209759039-RemoveHousekeepingSuggestedReviews.ts @@ -0,0 +1,16 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class RemoveHousekeepingSuggestedReviews1736209759039 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query( + `DROP TABLE IF EXISTS housekeeping_suggested_reviews` + ) + } + + // eslint-disable-next-line @typescript-eslint/no-empty-function + public async down(_queryRunner: QueryRunner): Promise { + return + } + +} diff --git a/db/migration/1736209905900-CreateHousekeeper.ts b/db/migration/1736209905900-CreateHousekeeper.ts new file mode 100644 index 0000000000..8709eded93 --- /dev/null +++ b/db/migration/1736209905900-CreateHousekeeper.ts @@ -0,0 +1,20 @@ +import { MigrationInterface, QueryRunner } from "typeorm"; + +export class CreateHousekeeper1736209905900 implements MigrationInterface { + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`-- sql + CREATE TABLE housekeeper_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 COMMENT "Type of the object to review (e.g. 'chart', 'dataset', etc.)", + objectId INTEGER NOT NULL COMMENT "ID of the object to review" + ) + `) + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`DROP TABLE housekeeper_reviews`) + } + +}