From a64fc9f95c0b7fedcafc7e1674b28bc579073fb0 Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-net@users.noreply.github.com> Date: Fri, 18 Oct 2024 21:48:18 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=83=8E=E3=83=BC=E3=83=88=E7=B7=A8?= =?UTF-8?q?=E9=9B=86=E6=99=82=E3=81=AB3001=E6=96=87=E5=AD=97=E4=BB=A5?= =?UTF-8?q?=E4=B8=8A=E3=81=AE=E5=A0=B4=E5=90=88=E7=B7=A8=E9=9B=86=E3=81=A7?= =?UTF-8?q?=E3=81=8D=E3=81=AA=E3=81=84=E5=95=8F=E9=A1=8C=E3=82=92=E4=BF=AE?= =?UTF-8?q?=E6=AD=A3=20(#505)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG_YOJO.md | 3 ++- .../1729171469427-noteEditHistoryLength.js | 14 ++++++++++++++ packages/backend/src/models/Note.ts | 2 +- 3 files changed, 17 insertions(+), 2 deletions(-) create mode 100644 packages/backend/migration/1729171469427-noteEditHistoryLength.js diff --git a/CHANGELOG_YOJO.md b/CHANGELOG_YOJO.md index a71e81c19e..abc99ea7df 100644 --- a/CHANGELOG_YOJO.md +++ b/CHANGELOG_YOJO.md @@ -43,7 +43,8 @@ Cherrypick 4.11.1 - Fix: Opensearch利用時ファイルのセンシティブ状態が変更されたとき変更されるように - Change: `notes/advanced-search`で`query`が必須ではなくなりました - Fix: (Opensearch利用時)高度な検索でリプライ除外にするとエラーがでる - +- Fix: ノート編集時に3001文字以上の場合編集できない問題を修正 + ### Misc ## 1.0.1 diff --git a/packages/backend/migration/1729171469427-noteEditHistoryLength.js b/packages/backend/migration/1729171469427-noteEditHistoryLength.js new file mode 100644 index 0000000000..10c77b66f6 --- /dev/null +++ b/packages/backend/migration/1729171469427-noteEditHistoryLength.js @@ -0,0 +1,14 @@ +/* + * SPDX-FileCopyrightText: syuilo and misskey-project, yojo-art team + * SPDX-License-Identifier: AGPL-3.0-only + */ +export class noteEditHistoryLength1729171469427 { + name = 'noteEditHistoryLength1729171469427'; + async up(queryRunner) { + await queryRunner.query('ALTER TABLE "note" ALTER COLUMN "noteEditHistory" TYPE varchar(8192)[]'); + } + + async down(queryRunner) { + await queryRunner.query('ALTER TABLE "note" ALTER COLUMN "noteEditHistory" TYPE varchar(3000)[]'); + } +} diff --git a/packages/backend/src/models/Note.ts b/packages/backend/src/models/Note.ts index 9709dc840c..e9037bf494 100644 --- a/packages/backend/src/models/Note.ts +++ b/packages/backend/src/models/Note.ts @@ -27,7 +27,7 @@ export class MiNote { public updatedAtHistory: Date[] | null; @Column('varchar', { - length: 3000, + length: 8192, array: true, default: '{}', })