Eileen has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/381135 )

Change subject: Alter definition of silverpop_countrylangs to match actual
......................................................................

Alter definition of silverpop_countrylangs to match actual

I have been hitting
_mysql_exceptions.OperationalError: (1267, Illegal mix of collations 
(utf8_unicode_ci,IMPLICIT) and (utf8_general_ci,IMPLICIT) for operation '=')

so I figured the table definition should be updated to match what is actually 
in use. It turned out to be a little
surprising - ie. varbinary & charset=binary, but I guess that is what the 
actual DB is using so it should be what
is in our code

Change-Id: Ic79e745028f32542de900f4819529a86124a648b
---
M silverpop_export/silverpop_countrylangs.sql
R silverpop_export/silverpop_export.yaml
2 files changed, 7 insertions(+), 7 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/wikimedia/fundraising/tools 
refs/changes/35/381135/1

diff --git a/silverpop_export/silverpop_countrylangs.sql 
b/silverpop_export/silverpop_countrylangs.sql
index 41e1c0f..ce0d918 100644
--- a/silverpop_export/silverpop_countrylangs.sql
+++ b/silverpop_export/silverpop_countrylangs.sql
@@ -1,11 +1,11 @@
 DROP TABLE IF EXISTS silverpop_countrylangs;
-CREATE TABLE IF NOT EXISTS silverpop_countrylangs(
-  id int unsigned PRIMARY KEY AUTO_INCREMENT,
-  country varchar(2),
-  lang varchar(20),
-
-  INDEX spcl_country (country)
-);
+ CREATE TABLE `silverpop_countrylangs` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
+  `country` varbinary(2) DEFAULT NULL,
+  `lang` varbinary(20) DEFAULT NULL,
+  PRIMARY KEY (`id`),
+  KEY `spcl_country` (`country`)
+) ENGINE=InnoDB DEFAULT CHARSET=binary;
 
 INSERT INTO silverpop_countrylangs (country, lang) VALUES
   ('AF', 'prs'),
diff --git a/silverpop_export/silverpop_export.yaml.example 
b/silverpop_export/silverpop_export.yaml
similarity index 100%
rename from silverpop_export/silverpop_export.yaml.example
rename to silverpop_export/silverpop_export.yaml

-- 
To view, visit https://gerrit.wikimedia.org/r/381135
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ic79e745028f32542de900f4819529a86124a648b
Gerrit-PatchSet: 1
Gerrit-Project: wikimedia/fundraising/tools
Gerrit-Branch: master
Gerrit-Owner: Eileen <emcnaugh...@wikimedia.org>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to