fix the migration from not reverting correctly

This commit is contained in:
Micaël Bergeron 2018-01-30 12:38:15 -05:00
parent e3f42c8d96
commit 07eb2f1297
1 changed files with 2 additions and 2 deletions

View File

@ -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