yumechi-no-kuni/packages/backend/migration/1731757142918-increase_character_limits.js
eternal-flame-AD 1862b33aba
All checks were successful
Lint / pnpm_install (push) Successful in 2m23s
Publish Docker image / Build (push) Successful in 5m4s
Lint / lint (backend) (push) Successful in 2m29s
Test (backend) / unit (22.11.0) (push) Successful in 9m49s
Lint / lint (frontend) (push) Successful in 2m35s
Lint / lint (frontend-embed) (push) Successful in 2m24s
Lint / lint (frontend-shared) (push) Successful in 2m40s
Lint / lint (misskey-bubble-game) (push) Successful in 2m29s
Lint / lint (misskey-js) (push) Successful in 2m41s
Test (backend) / e2e (22.11.0) (push) Successful in 13m29s
Lint / lint (misskey-reversi) (push) Successful in 2m51s
Lint / typecheck (backend) (push) Successful in 3m4s
Lint / lint (sw) (push) Successful in 3m10s
Lint / typecheck (misskey-js) (push) Successful in 1m46s
Test (production install and build) / production (22.11.0) (push) Successful in 1m24s
Lint / typecheck (sw) (push) Successful in 1m46s
pgroonga CW search
Signed-off-by: eternal-flame-AD <yume@yumechi.jp>
2024-11-16 05:50:57 -06:00

22 lines
1 KiB
JavaScript

/*
* SPDX-FileCopyrightText: hazelnoot and other Sharkey contributors
* SPDX-License-Identifier: AGPL-3.0-only
*/
export class IncreaseCharacterLimits1731757142918 {
name = 'IncreaseCharacterLimits1731757142918'
async up(queryRunner) {
await queryRunner.query(`DROP INDEX IF EXISTS "IDX_7cc8d9b0ee7861b4e5dc86ad85"`);
await queryRunner.query(`ALTER TABLE "drive_file" ALTER COLUMN "comment" TYPE varchar(32768)`);
await queryRunner.query(`ALTER TABLE "note" ALTER COLUMN "cw" TYPE text`);
await queryRunner.query(`CREATE INDEX "IDX_7cc8d9b0ee7861b4e5dc86ad85" ON "note" USING "pgroonga" ("cw")`);
}
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)`);
await queryRunner.query(`DROP INDEX "IDX_7cc8d9b0ee7861b4e5dc86ad85"`);
await queryRunner.query(`CREATE INDEX "IDX_7cc8d9b0ee7861b4e5dc86ad85" ON "note" USING "pgroonga" ("cw" pgroonga_varchar_full_text_search_ops)`);
}
}