-
-
Notifications
You must be signed in to change notification settings - Fork 229
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
housekeeper: this pr fixes all previous migrations (#4390)
* fix all migrations * 🤖 style: prettify code * create if not exists
- Loading branch information
1 parent
997a3c4
commit d29a33f
Showing
3 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
db/migration/1736209759039-RemoveHousekeepingSuggestedReviews.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
|
||
export class RemoveHousekeepingSuggestedReviews1736209759039 | ||
implements MigrationInterface | ||
{ | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
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<void> { | ||
return | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { MigrationInterface, QueryRunner } from "typeorm" | ||
|
||
export class CreateHousekeeper1736209905900 implements MigrationInterface { | ||
public async up(queryRunner: QueryRunner): Promise<void> { | ||
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<void> { | ||
await queryRunner.query(`DROP TABLE housekeeper_reviews`) | ||
} | ||
} |