From 26af4cb416b4275f4f87caef2e4c7cb9b7711c72 Mon Sep 17 00:00:00 2001 From: Ben Pirt Date: Mon, 4 Mar 2024 22:16:19 +0000 Subject: [PATCH] Enable the migration to run without always recreating an index (#98) --- .../resources/db/migration_postgres/V9__indexing_index_fix.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/postgres-persistence/src/main/resources/db/migration_postgres/V9__indexing_index_fix.sql b/postgres-persistence/src/main/resources/db/migration_postgres/V9__indexing_index_fix.sql index 0f8da6c29..410d01bd0 100644 --- a/postgres-persistence/src/main/resources/db/migration_postgres/V9__indexing_index_fix.sql +++ b/postgres-persistence/src/main/resources/db/migration_postgres/V9__indexing_index_fix.sql @@ -7,6 +7,6 @@ CREATE INDEX CONCURRENTLY IF NOT EXISTS workflow_index_json_data_gin_idx ON work DROP INDEX CONCURRENTLY IF EXISTS task_index_json_data_json_idx; DROP INDEX CONCURRENTLY IF EXISTS task_index_json_data_text_idx; -- Create the full text index on the json_data column of the task_index table -CREATE INDEX CONCURRENTLY IF NOT EXISTS task_index_json_data_json_idx ON task_index USING GIN (jsonb_to_tsvector('english', json_data, '["all"]')); +CREATE INDEX CONCURRENTLY IF NOT EXISTS task_index_json_data_fulltext_idx ON task_index USING GIN (jsonb_to_tsvector('english', json_data, '["all"]')); -- Create a new index to enable querying the json by attribute and value CREATE INDEX CONCURRENTLY IF NOT EXISTS task_index_json_data_gin_idx ON task_index USING GIN (json_data jsonb_path_ops);