From d4a5474f480d3dd00d71219a49b8c78c8938e21d Mon Sep 17 00:00:00 2001 From: Henry Heng Date: Tue, 7 May 2024 01:10:46 +0100 Subject: [PATCH] Bugfix/Escape column name on postgres migration indexing (#2342) escape column name on postgres migration indexing --- .../src/database/migrations/postgres/1693891895163-Init.ts | 2 +- .../migrations/postgres/1711637331047-AddDocumentStore.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/server/src/database/migrations/postgres/1693891895163-Init.ts b/packages/server/src/database/migrations/postgres/1693891895163-Init.ts index 3ffe055c..da7a981d 100644 --- a/packages/server/src/database/migrations/postgres/1693891895163-Init.ts +++ b/packages/server/src/database/migrations/postgres/1693891895163-Init.ts @@ -27,7 +27,7 @@ export class Init1693891895163 implements MigrationInterface { CONSTRAINT "PK_3cc0d85193aade457d3077dd06b" PRIMARY KEY (id) );` ) - await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_e574527322272fd838f4f0f3d3" ON chat_message USING btree (chatflowid);`) + await queryRunner.query(`CREATE INDEX IF NOT EXISTS "IDX_e574527322272fd838f4f0f3d3" ON chat_message USING btree ("chatflowid");`) await queryRunner.query( `CREATE TABLE IF NOT EXISTS credential ( id uuid NOT NULL DEFAULT uuid_generate_v4(), diff --git a/packages/server/src/database/migrations/postgres/1711637331047-AddDocumentStore.ts b/packages/server/src/database/migrations/postgres/1711637331047-AddDocumentStore.ts index ba3e74e6..063458fb 100644 --- a/packages/server/src/database/migrations/postgres/1711637331047-AddDocumentStore.ts +++ b/packages/server/src/database/migrations/postgres/1711637331047-AddDocumentStore.ts @@ -27,10 +27,10 @@ export class AddDocumentStore1711637331047 implements MigrationInterface { );` ) await queryRunner.query( - `CREATE INDEX IF NOT EXISTS "IDX_e76bae1780b77e56aab1h2asd4" ON document_store_file_chunk USING btree (docId);` + `CREATE INDEX IF NOT EXISTS "IDX_e76bae1780b77e56aab1h2asd4" ON document_store_file_chunk USING btree ("docId");` ) await queryRunner.query( - `CREATE INDEX IF NOT EXISTS "IDX_e213b811b01405a42309a6a410" ON document_store_file_chunk USING btree (storeId);` + `CREATE INDEX IF NOT EXISTS "IDX_e213b811b01405a42309a6a410" ON document_store_file_chunk USING btree ("storeId");` ) }