mirror of
https://github.com/docmost/docmost.git
synced 2026-06-11 02:36:56 +08:00
* Replace tsvector generated column with triggers.
* reason: due to typeorm generated column metadata bug
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
import { MigrationInterface, QueryRunner } from 'typeorm';
|
||||
|
||||
export class AddTsvectorColumn1706450034470 implements MigrationInterface {
|
||||
name = 'AddTsvectorColumn1706450034470';
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "pages" ADD "tsv" tsvector`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "pages" DROP COLUMN "tsv"`);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user