summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2015-09-19 21:07:43 +0000
committerRobert Speicher <robert@gitlab.com>2015-09-19 21:07:43 +0000
commit96790b1aac63b57321e5e61652e5a69497b64427 (patch)
tree2cfcf401bbd5434927fc1cac0645f7e7cf13bb51
parent5a8d73243a7b68f2724a6d5f9d482dda24e9dfe4 (diff)
parenta22b6c591f2c383468d1a6ec54208e407c0ca032 (diff)
downloadgitlab-ce-96790b1aac63b57321e5e61652e5a69497b64427.tar.gz
Merge branch 'fix-failing-migration' into 'master'
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 that installed gitlab according to our documentation. This MR removes the "TEMPORARY" from the migration and changes the documentation to include the necessary rights for the future. Fixes #2590 See merge request !1351
-rw-r--r--db/migrate/20150817163600_deduplicate_user_identities.rb2
-rw-r--r--doc/install/database_mysql.md2
2 files changed, 2 insertions, 2 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
diff --git a/doc/install/database_mysql.md b/doc/install/database_mysql.md
index 362c492d0ac..c565e90da2f 100644
--- a/doc/install/database_mysql.md
+++ b/doc/install/database_mysql.md
@@ -36,7 +36,7 @@ We do not recommend using MySQL due to various issues. For example, case [(in)se
mysql> CREATE DATABASE IF NOT EXISTS `gitlabhq_production` DEFAULT CHARACTER SET `utf8` COLLATE `utf8_unicode_ci`;
# Grant the GitLab user necessary permissions on the database
- mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost';
+ mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, CREATE TEMPORARY TABLES, DROP, INDEX, ALTER, LOCK TABLES ON `gitlabhq_production`.* TO 'git'@'localhost';
# Quit the database session
mysql> \q