mirror of
https://github.com/dkmstr/openuds.git
synced 2024-12-22 13:34:04 +03:00
Added "alter table character set" on creation to modify them to utf8 (better is to have database in utf8)
This commit is contained in:
parent
b8c5678bde
commit
abd4246b40
@ -57,5 +57,9 @@ def modify_MySQL_storage(sender, **kwargs):
|
||||
if dicTables.has_key(db_table):
|
||||
stmt = 'ALTER TABLE %s ENGINE=%s' % (db_table,'InnoDB')
|
||||
cursor.execute(stmt)
|
||||
# sets charset to utf8
|
||||
stmt = 'ALTER TABLE %s CHARACTER SET \'utf8\' COLLATE \'utf8_general_ci\'' % db_table
|
||||
cursor.execute(stmt)
|
||||
|
||||
|
||||
signals.post_syncdb.connect(modify_MySQL_storage, sender=models)
|
||||
|
Loading…
Reference in New Issue
Block a user