FoundKey/packages/backend/migration/1704236065406-removeNoteVisibility.js
Johann150 78359daac6
Some checks failed
ci/woodpecker/push/lint-foundkey-js Pipeline was successful
ci/woodpecker/push/lint-sw Pipeline failed
ci/woodpecker/push/lint-client Pipeline failed
ci/woodpecker/push/lint-backend Pipeline failed
ci/woodpecker/push/build Pipeline was successful
ci/woodpecker/push/test Pipeline failed
server: remove denormalized note visibility field
Changelog: Fixed
2024-01-03 16:13:13 +01:00

10 lines
481 B
JavaScript

export class removeNoteVisibility1704236065406 {
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "poll" DROP COLUMN "noteVisibility"`);
await queryRunner.query(`DROP TYPE "poll_notevisibility_enum"`);
}
async down(queryRunner) {
await queryRunner.query(`CREATE TYPE "poll_notevisibility_enum" AS ENUM('public', 'home', 'followers', 'specified')`);
await queryRunner.query(`ALTER TABLE "poll" ADD "noteVisibility" "poll_notevisibility_enum" NOT NULL`);
}
}