From 07eb2f1297e3172cc01b3899f0ba799b1e4aafdc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mica=C3=ABl=20Bergeron?= Date: Tue, 30 Jan 2018 12:38:15 -0500 Subject: [PATCH] fix the migration from not reverting correctly --- db/migrate/20180119135717_add_uploader_index_to_uploads.rb | 4 ++-- 1 file 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