Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLin Jen-Shin <godfat@godfat.org>2017-03-14 15:03:22 +0300
committerLin Jen-Shin <godfat@godfat.org>2017-03-14 15:03:22 +0300
commitf67d8eb1da269150764224cea1807195cdf2ffb5 (patch)
tree517acff7668b0d8486a9126e581fb2870663dbc0 /db/migrate/20170130204620_add_index_to_project_authorizations.rb
parentc9fbbb3ae2c7f0eb44b0f973155d68e678149544 (diff)
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/migrate/20170130204620_add_index_to_project_authorizations.rb')
-rw-r--r--db/migrate/20170130204620_add_index_to_project_authorizations.rb3
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