1
0
Fork 1
mirror of https://example.com synced 2024-11-26 09:16:39 +09:00
firefish/packages/backend/migration-neko/1704851359889-add-reply-muting.js

21 lines
795 B
JavaScript

export class AddReplyMuting1704851359889 {
name = "AddReplyMuting1704851359889";
async up(queryRunner) {
await queryRunner.query(
`CREATE TABLE "reply_muting" ("id" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL, "muteeId" character varying(32) NOT NULL, "muterId" character varying(32) NOT NULL, CONSTRAINT "PK_replyMuting_id" PRIMARY KEY ("id"))`,
);
await queryRunner.query(
`CREATE INDEX "IDX_reply_muting_createdAt" ON "muting" ("createdAt")`,
);
await queryRunner.query(
`CREATE INDEX "IDX_reply_muting_muteeId" ON "muting" ("muteeId")`,
);
await queryRunner.query(
`CREATE INDEX "IDX_reply_muting_muterId" ON "muting" ("muterId")`,
);
}
async down(queryRunner) {
await queryRunner.query(`DROP TABLE "reply_muting"`);
}
}