Skip to content

Commit

Permalink
make sure tables are UTF8 capable
Browse files Browse the repository at this point in the history
As discussed at #7742 (comment) make sure that tables have correct char set.
  • Loading branch information
bbodenmiller committed Oct 14, 2014
1 parent e3bd17a commit 0901345
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/update/7.3-to-7.4.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,15 @@ SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' ENGINE=InnoDB;')
# If previous query returned results, copy & run all outputed SQL statements
# Convert all tables to correct character set
SET foreign_key_checks = 0;
SELECT CONCAT('ALTER TABLE gitlabhq_production.', table_name, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') AS 'Copy & run these SQL statements:' FROM information_schema.tables WHERE table_schema = 'gitlabhq_production' AND `TABLE_COLLATION` <> 'utf8_unicode_ci' AND `TABLE_TYPE` = 'BASE TABLE';
# If previous query returned results, copy & run all outputed SQL statements
# turn foreign key checks back on
SET foreign_key_checks = 1;
# Find MySQL users
mysql> SELECT user FROM mysql.user WHERE user LIKE '%git%';
Expand Down

0 comments on commit 0901345

Please sign in to comment.