Drop the index only for postgresql, because

mysql cannot simply drop the index without dropping the corresponding
foreign key, and we certainly don't want to drop the foreign key
here.
This commit is contained in:
Lin Jen-Shin 2017-03-14 20:03:22 +08:00
parent c9fbbb3ae2
commit f67d8eb1da
1 changed files with 2 additions and 1 deletions

View File

@ -10,6 +10,7 @@ class AddIndexToProjectAuthorizations < ActiveRecord::Migration
end
def down
remove_index(:project_authorizations, :project_id)
remove_index(:project_authorizations, :project_id) if
Gitlab::Database.postgresql?
end
end