From 789d61d175e7f2878d8fee69645b5981d4d9bc03 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 10 Jan 2023 16:41:38 +0900 Subject: [PATCH] =?UTF-8?q?enhance(server):=20=E3=82=A2=E3=83=B3=E3=82=B1?= =?UTF-8?q?=E3=83=BC=E3=83=88=E9=81=B8=E6=8A=9E=E8=82=A2=E3=81=AE=E6=96=87?= =?UTF-8?q?=E5=AD=97=E6=95=B0=E5=88=B6=E9=99=90=E3=82=92=E7=B7=A9=E5=92=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve #9511 --- CHANGELOG.md | 1 + .../migration/1673336077243-PollChoiceLength.js | 11 +++++++++++ packages/backend/src/models/entities/Poll.ts | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 packages/backend/migration/1673336077243-PollChoiceLength.js diff --git a/CHANGELOG.md b/CHANGELOG.md index 3c1d99d83..5607dbf23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ You should also include the user name that made the change. - Server: signToActivityPubGet is set to true by default @syuilo - Server: improve syslog performance @syuilo - Server: improve note scoring for featured notes @CyberRex0 +- Server: アンケート選択肢の文字数制限を緩和 @syuilo - Server: delete outdated notifications regularly to improve db performance @syuilo - Server: delete outdated hard-mutes regularly to improve db performance @syuilo - Server: delete outdated notes of antenna regularly to improve db performance @syuilo diff --git a/packages/backend/migration/1673336077243-PollChoiceLength.js b/packages/backend/migration/1673336077243-PollChoiceLength.js new file mode 100644 index 000000000..810c626e0 --- /dev/null +++ b/packages/backend/migration/1673336077243-PollChoiceLength.js @@ -0,0 +1,11 @@ +export class PollChoiceLength1673336077243 { + name = 'PollChoiceLength1673336077243' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(256) array`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "poll" ALTER COLUMN "choices" TYPE character varying(128) array`); + } +} diff --git a/packages/backend/src/models/entities/Poll.ts b/packages/backend/src/models/entities/Poll.ts index 6641b435e..ee1d64602 100644 --- a/packages/backend/src/models/entities/Poll.ts +++ b/packages/backend/src/models/entities/Poll.ts @@ -24,7 +24,7 @@ export class Poll { public multiple: boolean; @Column('varchar', { - length: 128, array: true, default: '{}', + length: 256, array: true, default: '{}', }) public choices: string[];