From f149914f4f3ed54cd617837e32740941a44a10d8 Mon Sep 17 00:00:00 2001 From: shady-2004 Date: Tue, 16 Dec 2025 00:16:19 +0200 Subject: [PATCH] fix(migrations): clear migrations --- src/migrations/1765624407553-test.ts | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 src/migrations/1765624407553-test.ts diff --git a/src/migrations/1765624407553-test.ts b/src/migrations/1765624407553-test.ts deleted file mode 100644 index 5c608c3..0000000 --- a/src/migrations/1765624407553-test.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { MigrationInterface, QueryRunner } from 'typeorm'; - -export class AddUserSearchVectorV21764852003108 implements MigrationInterface { - public async up(query_runner: QueryRunner): Promise { - await query_runner.query(` - ALTER TABLE "user" - ADD COLUMN search_vector tsvector - GENERATED ALWAYS AS ( - setweight(to_tsvector('simple', coalesce(username, '')), 'A') || - setweight(to_tsvector('simple', coalesce(name, '')), 'B') - ) STORED - `); - - await query_runner.query(` - CREATE INDEX user_search_vector_idx - ON "user" - USING GIN (search_vector) - `); - } - - public async down(query_runner: QueryRunner): Promise { - await query_runner.query(`DROP INDEX IF EXISTS user_search_vector_idx`); - await query_runner.query(`ALTER TABLE "user" DROP COLUMN IF EXISTS search_vector`); - } -}