Enhance: アカウント移行機能を使用したユーザーに対してのモデレーションの強化 (#719)

* fix

* fix

* fix

* Feat: アカウント移行機能のモデレーションを行いやすくした

* コミット忘れ

* 文章を組み立てるのやめた

* Fix test

* Fix test

* updateModerationNote から mergeModerationNote に

* updateAccountMoveLogs から insertAccountMoveLog に

---------

Co-authored-by: nenohi <nenohi@nenohi.net>
Co-authored-by: nenohi <kimutipartylove@gmail.com>
This commit is contained in:
まっちゃてぃー。 2024-09-16 22:18:41 +09:00 committed by GitHub
parent 2fe5bb0bb3
commit 6c732d1bfd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
29 changed files with 593 additions and 13 deletions

View file

@ -0,0 +1,19 @@
export class Useraccountmovelogs1724749627479 {
name = 'Useraccountmovelogs1724749627479'
async up(queryRunner) {
await queryRunner.query(`CREATE TABLE "user_account_move_log" ("id" character varying(32) NOT NULL, "movedToId" character varying(32) NOT NULL, "movedFromId" character varying(32) NOT NULL, "createdAt" TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT now(), CONSTRAINT "PK_8ffd4ae965a5e3a0fbf4b084212" PRIMARY KEY ("id")); COMMENT ON COLUMN "user_account_move_log"."createdAt" IS 'The created date of the UserIp.'`);
await queryRunner.query(`CREATE INDEX "IDX_d5ee7d4d1b5e7a69d8855ab069" ON "user_account_move_log" ("movedToId") `);
await queryRunner.query(`CREATE INDEX "IDX_82930731d6390e7bb429a1938f" ON "user_account_move_log" ("movedFromId") `);
await queryRunner.query(`ALTER TABLE "user_account_move_log" ADD CONSTRAINT "FK_d5ee7d4d1b5e7a69d8855ab0696" FOREIGN KEY ("movedToId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
await queryRunner.query(`ALTER TABLE "user_account_move_log" ADD CONSTRAINT "FK_82930731d6390e7bb429a1938f8" FOREIGN KEY ("movedFromId") REFERENCES "user"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "user_account_move_log" DROP CONSTRAINT "FK_82930731d6390e7bb429a1938f8"`);
await queryRunner.query(`ALTER TABLE "user_account_move_log" DROP CONSTRAINT "FK_d5ee7d4d1b5e7a69d8855ab0696"`);
await queryRunner.query(`DROP INDEX "public"."IDX_82930731d6390e7bb429a1938f"`);
await queryRunner.query(`DROP INDEX "public"."IDX_d5ee7d4d1b5e7a69d8855ab069"`);
await queryRunner.query(`DROP TABLE "user_account_move_log"`);
}
}