hippofish/packages/backend/migration/1692825433698-emoji-moderator.js

18 lines
566 B
JavaScript
Raw Normal View History

2024-02-20 09:39:32 +01:00
export class EmojiModerator1692825433698 {
name = "EmojiModerator1692825433698";
async up(queryRunner) {
await queryRunner.query(
`CREATE TYPE "public"."user_emojimodperm_enum" AS ENUM('unauthorized', 'add', 'mod', 'full')`,
);
await queryRunner.query(
`ALTER TABLE "user" ADD "emojiModPerm" "public"."user_emojimodperm_enum" NOT NULL DEFAULT 'unauthorized'`,
);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "emojiModPerm"`);
await queryRunner.query(`DROP TYPE "public"."user_emojimodperm_enum"`);
}
}