summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-23 10:52:21 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-12-23 10:52:21 +0200
commit031461e1063040f61f80872de4394e763ec2dfa2 (patch)
treeacc9a589daf92a39322debd147ae13a9075d2f20 /db
parentf023db2b474ab53056bdff3d01675fb6388265cd (diff)
downloadgitlab-ce-031461e1063040f61f80872de4394e763ec2dfa2.tar.gz
Fix migration issue for mysql with index not being removed
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20141121161704_add_identity_table.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/db/migrate/20141121161704_add_identity_table.rb b/db/migrate/20141121161704_add_identity_table.rb
index 6fe63637dfe..cf56fd6c227 100644
--- a/db/migrate/20141121161704_add_identity_table.rb
+++ b/db/migrate/20141121161704_add_identity_table.rb
@@ -14,6 +14,7 @@ SELECT provider, extern_uid, id FROM users
WHERE provider IS NOT NULL
eos
+ remove_index :users, ["extern_uid", "provider"]
remove_column :users, :extern_uid
remove_column :users, :provider
end
@@ -34,5 +35,6 @@ eos
end
drop_table :identities
+ add_index "users", ["extern_uid", "provider"], name: "index_users_on_extern_uid_and_provider", unique: true, using: :btree
end
end