From 4c26e3c54d628a584a1e00e0483b10e97f261b0d Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Fri, 6 Mar 2020 23:09:06 +0900 Subject: [PATCH] =?UTF-8?q?note=5Freaction.reaction=20=E3=81=AF=20130?= =?UTF-8?q?=E6=96=87=E5=AD=97=E3=81=AB=20(#6105)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- migration/1582875306439-note-reaction-length.ts | 14 ++++++++++++++ src/models/entities/note-reaction.ts | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 migration/1582875306439-note-reaction-length.ts diff --git a/migration/1582875306439-note-reaction-length.ts b/migration/1582875306439-note-reaction-length.ts new file mode 100644 index 000000000..b9af61eb0 --- /dev/null +++ b/migration/1582875306439-note-reaction-length.ts @@ -0,0 +1,14 @@ +import {MigrationInterface, QueryRunner} from "typeorm"; + +export class noteReactionLength1582875306439 implements MigrationInterface { + name = 'noteReactionLength1582875306439' + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(130)`, undefined); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`ALTER TABLE "note_reaction" ALTER COLUMN "reaction" TYPE character varying(128)`, undefined); + } + +} diff --git a/src/models/entities/note-reaction.ts b/src/models/entities/note-reaction.ts index a958e8957..995748760 100644 --- a/src/models/entities/note-reaction.ts +++ b/src/models/entities/note-reaction.ts @@ -36,7 +36,7 @@ export class NoteReaction { public note: Note | null; @Column('varchar', { - length: 128 + length: 130 }) public reaction: string; }