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
path: root/db
diff options
context:
space:
mode:
authorHannes Rosenögger <123haynes@gmail.com>2015-09-18 20:49:04 +0300
committerHannes Rosenögger <123haynes@gmail.com>2015-09-18 20:49:04 +0300
commita22b6c591f2c383468d1a6ec54208e407c0ca032 (patch)
tree3ebeb6c9b81e2edbeff644247af411f684fc2646 /db
parentb2c06bf707c6951c5c99c189327aec785b2c79ea (diff)
fix failing migration on mysql
We didn't specify that the db user needs the right to create temporary tables before. That's why the migration will fail on most installations. This commits removes the "TEMPORARY" from the migration and changes the documentation to include the necessary rights for the future.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150817163600_deduplicate_user_identities.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20150817163600_deduplicate_user_identities.rb b/db/migrate/20150817163600_deduplicate_user_identities.rb
index fab669c2905..fceffc48018 100644
--- a/db/migrate/20150817163600_deduplicate_user_identities.rb
+++ b/db/migrate/20150817163600_deduplicate_user_identities.rb
@@ -1,7 +1,7 @@
class DeduplicateUserIdentities < ActiveRecord::Migration
def change
execute 'DROP TABLE IF EXISTS tt_migration_DeduplicateUserIdentities;'
- execute 'CREATE TEMPORARY TABLE tt_migration_DeduplicateUserIdentities AS SELECT id,provider,user_id FROM identities;'
+ execute 'CREATE TABLE tt_migration_DeduplicateUserIdentities AS SELECT id,provider,user_id FROM identities;'
execute 'DELETE FROM identities WHERE id NOT IN ( SELECT MIN(id) FROM tt_migration_DeduplicateUserIdentities GROUP BY user_id, provider);'
execute 'DROP TABLE IF EXISTS tt_migration_DeduplicateUserIdentities;'
end