iceshrimp/packages/backend/migration/1680426269172-SpeakAsCat.js

21 lines
499 B
JavaScript
Raw Normal View History

export class SpeakAsCat1680426269172 {
2023-04-07 10:56:46 +09:00
name = "SpeakAsCat1680426269172";
2023-04-07 10:56:46 +09:00
async up(queryRunner) {
await queryRunner.query(`
ALTER TABLE "user"
ADD "speakAsCat" boolean NOT NULL DEFAULT true
`);
2023-04-07 10:56:46 +09:00
await queryRunner.query(`
COMMENT ON COLUMN "user"."speakAsCat"
IS 'Whether to speak as a cat if isCat.'
`);
2023-04-07 10:56:46 +09:00
}
2023-04-07 10:56:46 +09:00
async down(queryRunner) {
await queryRunner.query(`
ALTER TABLE "user" DROP COLUMN "speakAsCat"
`);
2023-04-07 10:56:46 +09:00
}
}