From 1223aa0a01ce251db3187f1bc979ea994c694510 Mon Sep 17 00:00:00 2001 From: ThatOneCalculator Date: Tue, 10 Jan 2023 07:48:04 -0800 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Poll=20choice=20length=20?= =?UTF-8?q?256?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Syuilo Closes #9433 --- package.json | 2 +- .../migration/1673336077243-PollChoiceLength.js | 11 +++++++++++ packages/backend/src/models/entities/poll.ts | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 packages/backend/migration/1673336077243-PollChoiceLength.js diff --git a/package.json b/package.json index 8ab92436c6..c50e057a68 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "calckey", - "version": "13.0.6-rc", + "version": "13.0.7-rc", "codename": "aqua", "repository": { "type": "git", diff --git a/packages/backend/migration/1673336077243-PollChoiceLength.js b/packages/backend/migration/1673336077243-PollChoiceLength.js new file mode 100644 index 0000000000..13db7dd963 --- /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 83d0873cc5..d833dd7bc5 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[];