Created
June 25, 2018 00:37
-
-
Save xtrasmal/760096e01317ca7f9927e0c041382614 to your computer and use it in GitHub Desktop.
Alter all tables collation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT("ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ", | |
"ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ") | |
AS alter_sql | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = 'mist'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment