1
0
Fork 0
mirror of https://github.com/paricafe/misskey.git synced 2025-04-01 09:09:29 -05:00

increase character limits

This commit is contained in:
fly_mc 2024-11-16 18:27:27 +08:00
parent e692e7ac6f
commit d30db97b59
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,18 @@
/*
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class IncreaseCharacterLimits1727998351561 {
name = 'IncreaseCharacterLimits1727998351561'
async up(queryRunner) {
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "comment" TYPE varchar(100000)`);
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "cw" TYPE text`);
}
async down(queryRunner) {
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "cw" TYPE varchar(512)`);
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "comment" TYPE varchar(8192)`);
}
}

View file

@ -0,0 +1,17 @@
export class AfterIncreaseCharacterLimits1727998351591 {
name = 'AfterIncreaseCharacterLimits1727998351591'
async up(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_7cc8d9b0ee7861b4e5dc86ad85"`);
await queryRunner.query(
`CREATE INDEX IF NOT EXISTS "IDX_7cc8d9b0ee7861b4e5dc86ad85" ON "note" USING "pgroonga" ("cw")`,
);
}
async down(queryRunner) {
await queryRunner.query(`DROP INDEX "IDX_7cc8d9b0ee7861b4e5dc86ad85"`);
await queryRunner.query(
`CREATE INDEX IF NOT EXISTS "IDX_7cc8d9b0ee7861b4e5dc86ad85" ON "note" USING "pgroonga" ("cw" pgroonga_varchar_full_text_search_ops_v2)`,
);
}
}