summaryrefslogtreecommitdiff
path: root/packages/backend/migration
diff options
context:
space:
mode:
authorsyuilo <4439005+syuilo@users.noreply.github.com>2025-07-31 14:40:51 +0900
committerGitHub <noreply@github.com>2025-07-31 14:40:51 +0900
commitf2a23fb55ef2100bd26e3f2bcd7f939052c2ea09 (patch)
treedff9f61bbb387e2e7d871cdf1d83d1580ebef10a /packages/backend/migration
parentfix(test): Fix name of a test in e2e/timelines.ts (#16334) (diff)
downloadmisskey-f2a23fb55ef2100bd26e3f2bcd7f939052c2ea09.tar.gz
misskey-f2a23fb55ef2100bd26e3f2bcd7f939052c2ea09.tar.bz2
misskey-f2a23fb55ef2100bd26e3f2bcd7f939052c2ea09.zip
ノートの脱CASCADE削除 (#16332)
* wip * Update CHANGELOG.md * Update QueryService.ts * Update QueryService.ts * wip * Update MkNoteDetailed.vue * Update NoteEntityService.ts * wip * Update antennas.ts * Update create.ts * Update NoteEntityService.ts * wip * Update CHANGELOG.md * Update NoteEntityService.ts * Update NoteCreateService.ts * Update note.test.ts * Update note.test.ts * Update ClientServerService.ts * Update ClientServerService.ts * add error handling * Update NoteDeleteService.ts * Update CHANGELOG.md * Update entities.ts * Update entities.ts * Update misskey-js.api.md
Diffstat (limited to 'packages/backend/migration')
-rw-r--r--packages/backend/migration/1753868431598-remove_note_constraints.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/packages/backend/migration/1753868431598-remove_note_constraints.js b/packages/backend/migration/1753868431598-remove_note_constraints.js
new file mode 100644
index 0000000000..29540cf9de
--- /dev/null
+++ b/packages/backend/migration/1753868431598-remove_note_constraints.js
@@ -0,0 +1,18 @@
+/*
+ * SPDX-FileCopyrightText: syuilo and misskey-project
+ * SPDX-License-Identifier: AGPL-3.0-only
+ */
+
+export class RemoveNoteConstraints1753868431598 {
+ name = 'RemoveNoteConstraints1753868431598'
+
+ async up(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_52ccc804d7c69037d558bac4c96"`);
+ await queryRunner.query(`ALTER TABLE "note" DROP CONSTRAINT "FK_17cb3553c700a4985dff5a30ff5"`);
+ }
+
+ async down(queryRunner) {
+ await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_17cb3553c700a4985dff5a30ff5" FOREIGN KEY ("replyId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
+ await queryRunner.query(`ALTER TABLE "note" ADD CONSTRAINT "FK_52ccc804d7c69037d558bac4c96" FOREIGN KEY ("renoteId") REFERENCES "note"("id") ON DELETE CASCADE ON UPDATE NO ACTION`);
+ }
+}