Commit 07eb2f12 authored by Micaël Bergeron's avatar Micaël Bergeron

fix the migration from not reverting correctly

parent e3f42c8d
...@@ -9,12 +9,12 @@ class AddUploaderIndexToUploads < ActiveRecord::Migration ...@@ -9,12 +9,12 @@ class AddUploaderIndexToUploads < ActiveRecord::Migration
disable_ddl_transaction! disable_ddl_transaction!
def up 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 add_concurrent_index :uploads, [:uploader, :path], using: :btree
end end
def down 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 add_concurrent_index :uploads, :path, using: :btree
end end
end end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment