-
Merge branch 'fix-mysql-migration' into 'master' · 554719d9Dmitriy Zaporozhets authored
Fix mysql migration Fixes exception noted in https://gitlab.com/gitlab-org/gitlab-ce/issues/913 ``` ** Invoke db:migrate (first_time) ** Invoke environment (first_time) ** Execute environment ** Invoke db:load_config (first_time) ** Execute db:load_config ** Execute db:migrate == 20141121161704 AddIdentityTable: migrating ================================= -- create_table(:identities) -> 0.1214s -- add_index(:identities, :user_id) -> 0.1660s -- execute("INSERT INTO identities (provider, extern_uid, user_id)\nSELECT provider, extern_uid, id FROM users\nWHERE provider IS NOT NULL\n") -> 0.0518s -- remove_column(:users, :extern_uid) rake aborted! StandardError: An error has occurred, all later migrations canceled: Mysql2::Error: Duplicate entry 'ldap' for key 'index_users_on_extern_uid_and_provider': ALTER TABLE `users` DROP `extern_uid`/home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:301:in `query' /home/git/gitlab/vendor/bundle/ruby/2.1.0/gems/activerecord-4.1.1/lib/active_record/connection_adapters/abstract_mysql_adapter.rb:301:in `block in execute' ``` See merge request !1344
554719d9