diff options
author | Lin Jen-Shin <godfat@godfat.org> | 2017-03-14 20:03:22 +0800 |
---|---|---|
committer | Lin Jen-Shin <godfat@godfat.org> | 2017-03-14 20:03:22 +0800 |
commit | f67d8eb1da269150764224cea1807195cdf2ffb5 (patch) | |
tree | 517acff7668b0d8486a9126e581fb2870663dbc0 /db | |
parent | c9fbbb3ae2c7f0eb44b0f973155d68e678149544 (diff) | |
download | gitlab-ce-f67d8eb1da269150764224cea1807195cdf2ffb5.tar.gz |
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.
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20170130204620_add_index_to_project_authorizations.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/db/migrate/20170130204620_add_index_to_project_authorizations.rb b/db/migrate/20170130204620_add_index_to_project_authorizations.rb index a8c504f265a..629b49436e3 100644 --- a/db/migrate/20170130204620_add_index_to_project_authorizations.rb +++ b/db/migrate/20170130204620_add_index_to_project_authorizations.rb @@ -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 |