From 0967ce478d85ad5053522944b36ed9212f867457 Mon Sep 17 00:00:00 2001 From: Guo Xiang Tan Date: Thu, 20 Aug 2020 14:25:20 +0800 Subject: [PATCH] DEV: Remove migration that is no longer required. Avoid creating the index twice. Follow-up to 628319aad385eb001f900c2c1909448b101b75a2 --- ..._create_partial_index_on_post_search_data.rb | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 db/migrate/20200813090811_create_partial_index_on_post_search_data.rb diff --git a/db/migrate/20200813090811_create_partial_index_on_post_search_data.rb b/db/migrate/20200813090811_create_partial_index_on_post_search_data.rb deleted file mode 100644 index 4189f364637..00000000000 --- a/db/migrate/20200813090811_create_partial_index_on_post_search_data.rb +++ /dev/null @@ -1,17 +0,0 @@ -# frozen_string_literal: true - -class CreatePartialIndexOnPostSearchData < ActiveRecord::Migration[6.0] - disable_ddl_transaction! - - def up - execute <<~SQL - CREATE INDEX CONCURRENTLY idx_regular_post_search_data ON post_search_data USING GIN(search_data) WHERE NOT private_message - SQL - end - - def down - execute <<~SQL - DROP INDEX IF EXISTS idx_regular_post_search_data; - SQL - end -end