merge: fix(BE): Set serverRules to text (!1209)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/1209

Approved-by: dakkar <dakkar@thenautilus.net>
Approved-by: Hazelnoot <acomputerdog@gmail.com>
This commit is contained in:
Hazelnoot 2025-08-29 15:50:11 +00:00
commit 49c4c2b9ad
2 changed files with 15 additions and 2 deletions

View file

@ -0,0 +1,14 @@
/*
* SPDX-FileCopyrightText: Lillychan and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class MetaRulesLength1754754816000 {
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "serverRules" TYPE TEXT`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "meta" ALTER COLUMN "serverRules" TYPE character varying(280)`);
}
}

View file

@ -633,8 +633,7 @@ export class MiMeta {
})
public policies: Record<string, any>;
@Column('varchar', {
length: 280,
@Column('text', {
array: true,
default: '{}',
})