From 44ec40028c60b4f3a5d3f1bb049996f4d2caf9af Mon Sep 17 00:00:00 2001 From: James Lopez Date: Wed, 5 Apr 2017 16:59:28 +0200 Subject: [PATCH] fix project authorizations migration issue --- .../20170130204620_add_index_to_project_authorizations.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/db/migrate/20170130204620_add_index_to_project_authorizations.rb b/db/migrate/20170130204620_add_index_to_project_authorizations.rb index 629b49436e3..8c593c39440 100644 --- a/db/migrate/20170130204620_add_index_to_project_authorizations.rb +++ b/db/migrate/20170130204620_add_index_to_project_authorizations.rb @@ -6,7 +6,9 @@ class AddIndexToProjectAuthorizations < ActiveRecord::Migration disable_ddl_transaction! def up - add_concurrent_index(:project_authorizations, :project_id) + unless index_exists?(:project_authorizations, :project_id) + add_concurrent_index(:project_authorizations, :project_id) + end end def down