fix database type of chat_message.text

This commit is contained in:
Hazelnoot 2025-07-26 20:08:30 -04:00
parent dc1416d5d8
commit e78c4d99f6
2 changed files with 18 additions and 2 deletions

View file

@ -0,0 +1,16 @@
/*
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class ChangeChatMessageTextType1753574755478 {
name = 'ChangeChatMessageTextType1753574755478'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "chat_message" ALTER COLUMN "text" TYPE text`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "chat_message" ALTER COLUMN "text" TYPE varchar(4096)`);
}
}

View file

@ -50,8 +50,8 @@ export class MiChatMessage {
@JoinColumn()
public toRoom: MiChatRoom | null;
@Column('varchar', {
length: 4096, nullable: true,
@Column('text', {
nullable: true,
})
public text: string | null;