김예미

update SQLiteToMysql.py charset

......@@ -34,7 +34,7 @@ for line in fileinput.input():
m = re.search('CREATE TABLE "?(\w*)"?(.*)', line)
if m:
name, sub = m.groups()
line = "DROP TABLE IF EXISTS %(name)s;\nCREATE TABLE IF NOT EXISTS %(name)s%(sub)s\nALTER TABLE %(name)s convert to charset utf8mb4 collate utf8mb4_bin;\n"
line = "DROP TABLE IF EXISTS %(name)s;\nCREATE TABLE IF NOT EXISTS %(name)s%(sub)s\nALTER TABLE %(name)s convert to charset utf8 collate utf8_unicode_ci;\n"
line = line % dict(name=name, sub=sub)
line = line.replace('autoincrement','AUTO_INCREMENT')
line = line.replace('text not null primary key','varchar(200) not null primary key')
......