Last active
December 15, 2015 09:59
-
-
Save kehh/5242853 to your computer and use it in GitHub Desktop.
ICA AtoM create en_AU locale see results in https://gist.github.com/kehh/5242861
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 ("update `", table_name, "` set ", column_name, " = 'en_AU' where ", column_name, " = 'en';") as 'BEGIN;' from information_schema.columns where column_name = 'source_culture' and table_name not in ('taxonomy', 'term', 'setting', 'loan'); | |
select 'SHOW WARNINGS;'; | |
select concat("delete from `", table_name, "` where culture = 'en_AU'; replace into `", table_name,"` (", group_concat(column_name), ", culture) select ", group_concat(column_name), ", 'en_AU' as culture from `", table_name, "` where culture = 'en';") as 'begin;' from information_schema.columns where table_schema='qubit' and table_name like '%i18n' and column_name != 'culture' group by table_name order by table_name, column_name; | |
select 'SHOW WARNINGS;'; | |
select 'COMMIT;'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
you can load this by running something like
mysql -umysql_user -pmysqlpass qubit_db < add_en_AU_make_query.sql |mysql -umysql_user -pmysqlpass qubit_db
but entering the correcct value for mysql_user, mysqlpass, qubit_db (or setting those in your my.cnf file)