-- Preparations SET SESSION group_concat_max_len=4294967295; SET SESSION foreign_key_checks=0; -- Set default character sets and collations ALTER DATABASE dwdata CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER DATABASE dwnotification CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER DATABASE dwsystem CHARACTER SET utf8 COLLATE utf8_general_ci; ALTER DATABASE dwworkflowengine CHARACTER SET utf8 COLLATE utf8_general_ci; -- Create statement that adjusts collations for tables in dwdata SELECT GROUP_CONCAT(CONCAT('ALTER TABLE ', TABLE_SCHEMA, '.', TABLE_NAME, ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;') SEPARATOR '\n') AS "Prepared statement" FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='dwdata' AND TABLE_TYPE='BASE TABLE';
↧