Edgewall Software

Changes between Version 49 and Version 50 of MySqlDb


Ignore:
Timestamp:
Feb 5, 2010, 2:06:15 PM (14 years ago)
Author:
anatoly techtonik <techtonik@…>
Comment:

finally! the proper way to convert collation for tables

Legend:

Unmodified
Added
Removed
Modified
  • MySqlDb

    v49 v50  
    109109
    110110==== Collation from "whatever" to "utf8_bin" ====
    111 First modify DB collation:
     111First modify DB collation to ensure new tables will be created properly:
    112112{{{
    113113ALTER DATABASE `trac_database` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
    114114}}}
    115115
    116 Then modify tables - issue the following for every table:
     116Then modify collation for tables. The command below changes default collation for new columns and converts old columns as well. Issue it for every table:
    117117{{{
    118 ALTER TABLE `table_name` DEFAULT CHARACTER SET utf8 COLLATE utf8_bin;
     118ALTER TABLE `table_name` CONVERT TO CHARACTER SET utf8 COLLATE utf8_bin;
    119119}}}
    120120