diff --git a/db/migrate/20240708210311_update_index_on_ivc_champva_forms.rb b/db/migrate/20240708210311_update_index_on_ivc_champva_forms.rb new file mode 100644 index 00000000000..f577c8ed11c --- /dev/null +++ b/db/migrate/20240708210311_update_index_on_ivc_champva_forms.rb @@ -0,0 +1,17 @@ +class UpdateIndexOnIvcChampvaForms < ActiveRecord::Migration[7.1] + disable_ddl_transaction! + + def up + safety_assured do + execute "DROP INDEX CONCURRENTLY IF EXISTS index_ivc_champva_forms_on_form_uuid;" + execute "CREATE INDEX CONCURRENTLY index_ivc_champva_forms_on_form_uuid ON public.ivc_champva_forms USING btree (form_uuid);" + end + end + + def down + safety_assured do + execute "DROP INDEX CONCURRENTLY IF EXISTS index_ivc_champva_forms_on_form_uuid;" + execute "CREATE INDEX CONCURRENTLY index_ivc_champva_forms_on_form_uuid ON public.ivc_champva_forms USING btree (form_uuid);" + end + end +end diff --git a/db/schema.rb b/db/schema.rb index b9edcc24777..e72de5f0bb6 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema[7.1].define(version: 2024_07_03_201622) do +ActiveRecord::Schema[7.1].define(version: 2024_07_08_210311) do # These are extensions that must be enabled in order to support this database enable_extension "btree_gin" enable_extension "pg_stat_statements"