1
0
mirror of https://github.com/hotomoe/hotomoe synced 2024-12-14 06:38:13 +09:00
hotomoe/packages/backend/migration/1690463372775-announcement-display-order.js
まっちゃとーにゅ fe0f7a91a3
feat: お知らせの優先順位機能 (#118)
ついでにお知らせのページング処理、わかったのボタン押したとき更新されるように
2023-07-28 00:29:33 +09:00

14 lines
586 B
JavaScript

export class AnnouncementDisplayOrder1690463372775 {
name = 'AnnouncementDisplayOrder1690463372775'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "announcement" ADD "displayOrder" integer NOT NULL DEFAULT '0'`);
await queryRunner.query(`CREATE INDEX "IDX_b64d293ca4bef21e91963054b0" ON "announcement" ("displayOrder") `);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "public"."IDX_b64d293ca4bef21e91963054b0"`);
await queryRunner.query(`ALTER TABLE "announcement" DROP COLUMN "displayOrder"`);
}
}