summaryrefslogtreecommitdiff
path: root/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20180119135717_add_uploader_index_to_uploads.rb')
-rw-r--r--db/migrate/20180119135717_add_uploader_index_to_uploads.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/migrate/20180119135717_add_uploader_index_to_uploads.rb b/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
index 7fedfaa5d7d..a678c3d049f 100644
--- a/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
+++ b/db/migrate/20180119135717_add_uploader_index_to_uploads.rb
@@ -9,12 +9,12 @@ class AddUploaderIndexToUploads < ActiveRecord::Migration
disable_ddl_transaction!
def up
- remove_concurrent_index :uploads, :path if index_exists? :uploads, :path
+ remove_concurrent_index :uploads, :path
add_concurrent_index :uploads, [:uploader, :path], using: :btree
end
def down
- remove_concurrent_index :uploads, [:uploader, :path] if index_exists? :uploads, [:uploads, :path]
+ remove_concurrent_index :uploads, [:uploader, :path]
add_concurrent_index :uploads, :path, using: :btree
end
end