![]() ![]() ![]() Stack Exchange Network Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Running this will create the actual migration script for your particular database structure and save it in a file called alterTables. To create a collation from the operating system locale frFR.utf8 (assuming the current database encoding is UTF8 ): CREATE COLLATION french (locale frFR. Both of the following are stuck forever: CREATE DATABASE foo WITH OWNER postgres ENCODING 'UTF8' CONNE. Use information_schema SELECT concat ( "ALTER DATABASE `", table_schema, "` CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci " ) as _sql FROM ` TABLES ` where table_schema like 'vikunja' and TABLE_TYPE = 'BASE TABLE' group by table_schema SELECT concat ( "ALTER TABLE `", table_schema, "`.`", table_name, "` CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci " ) as _sql FROM ` TABLES ` where table_schema like 'vikunja' and TABLE_TYPE = 'BASE TABLE' group by table_schema, table_name SELECT concat ( "ALTER TABLE `", table_schema, "`.`", table_name, "` CHANGE `", column_name, "` `", column_name, "` ", data_type, "(", character_maximum_length, ") CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci", IF ( is_nullable = "YES", " NULL", " NOT NULL" ), " " ) as _sql FROM ` COLUMNS ` where table_schema like 'vikunja' and data_type in ( 'varchar', 'char' ) SELECT concat ( "ALTER TABLE `", table_schema, "`.`", table_name, "` CHANGE `", column_name, "` `", column_name, "` ", data_type, " CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci", IF ( is_nullable = "YES", " NULL", " NOT NULL" ), " " ) as _sql FROM ` COLUMNS ` where table_schema like 'vikunja' and data_type in ( 'text', 'tinytext', 'mediumtext', 'longtext' ) 2. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |