add down-migration for renote mutes

This commit is contained in:
Chloe Kudryavtsev 2022-10-07 15:23:58 -04:00 committed by ThatOneCalculator
parent 1b21899ffd
commit 13fc7e9f5f
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
export class addRenoteMuting1665091090561 {
constructor() {
this.name = 'addRenoteMuting1665091090561';
}
async up(queryRunner) {
await queryRunner.query(`CREATE TABLE "renote_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_renoteMuting_id" PRIMARY KEY ("id"))`);
await queryRunner.query(`CREATE INDEX "IDX_renote_muting_createdAt" ON "muting" ("createdAt") `);
await queryRunner.query(`CREATE INDEX "IDX_renote_muting_muteeId" ON "muting" ("muteeId") `);
await queryRunner.query(`CREATE INDEX "IDX_renote_muting_muterId" ON "muting" ("muterId") `);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_renote_muting_createdAt"`);
await queryRunner.query(`DROP INDEX "IDX_renote_muting_muteeId"`);
await queryRunner.query(`DROP INDEX "IDX_renote_muting_muterId"`);
await queryRunner.query(`DROP TABLE "renote_muting"`);
}
}