Skip to content
Snippets Groups Projects
Unverified Commit 750085ff authored by atsuchan's avatar atsuchan Committed by GitHub
Browse files

Fix: DB CONSTRAINT of RenoteMuting (#11724)

* Fix: DB CONSTRAINT of RenoteMuting

* change order of migration of fixing renotemuting
parent 3eacbe6b
No related branches found
No related tags found
No related merge requests found
......@@ -16,5 +16,9 @@ export class addRenoteMuting1665091090561 {
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_renote_muting_muterId"`);
await queryRunner.query(`DROP INDEX "IDX_renote_muting_muteeId"`);
await queryRunner.query(`DROP INDEX "IDX_renote_muting_createdAt"`);
await queryRunner.query(`DROP TABLE "renote_muting"`);
}
}
export class FixRenoteMuting1690417561185 {
name = 'FixRenoteMuting1690417561185'
async up(queryRunner) {
await queryRunner.query(`DELETE FROM "renote_muting" WHERE "muteeId" NOT IN (SELECT "id" FROM "user")`);
await queryRunner.query(`DELETE FROM "renote_muting" WHERE "muterId" NOT IN (SELECT "id" FROM "user")`);
}
async down(queryRunner) {
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment