diff --git a/qiita_db/support_files/patches/93.sql b/qiita_db/support_files/patches/93.sql index 92e248a52..7c3772ecc 100644 --- a/qiita_db/support_files/patches/93.sql +++ b/qiita_db/support_files/patches/93.sql @@ -45,11 +45,11 @@ ALTER TABLE qiita.processing_job ALTER COLUMN command_parameters TYPE JSONB USING command_parameters::jsonb; -- This indexing will take like 5 min -CREATE INDEX processing_job_command_parameters_job_id ON qiita.processing_job +CREATE INDEX IF NOT EXISTS processing_job_command_parameters_job_id ON qiita.processing_job USING GIN((command_parameters->>'job_id') gin_trgm_ops); -- This indexing will take like an hour -CREATE INDEX processing_job_command_parameters_payload ON qiita.processing_job +CREATE INDEX IF NOT EXISTS processing_job_command_parameters_payload ON qiita.processing_job USING GIN((command_parameters->>'payload') gin_trgm_ops); -- After the changes diff --git a/qiita_db/support_files/patches/test_db_sql/92.sql b/qiita_db/support_files/patches/test_db_sql/92.sql index 938b1bb2a..63b32f7a5 100644 --- a/qiita_db/support_files/patches/test_db_sql/92.sql +++ b/qiita_db/support_files/patches/test_db_sql/92.sql @@ -952,3 +952,8 @@ INSERT INTO qiita.human_reads_filter_method ( UPDATE qiita.artifact SET human_reads_filter_method_id = 1 WHERE artifact_id = 1; + +-- Oct 18, 2024 +-- This is going to be used in 93.sql but adding it here so it happens before that +-- patch in the test database +CREATE EXTENSION pg_trgm;