First, thanks for the 3.8 upgrade. Much appreciated.

I already had accents in my tickets, and running schema.mysql-4.0-4.1.pl
would garble them. This is using mysql 5.0.51a on Redhat.

I discovered that if I skip the VARBINARY part of the upgrade, the data
is fine. So instead of

        ALTER TABLE Tickets MODIFY Subject VARBINARY(10) NULL DEFAULT
NULL;
        ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
utf8 NULL DEFAULT NULL;

Just do:

        ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
utf8 NULL DEFAULT NULL;

So, if your data is garbled post upgrade, restore your backup (you had a
backup, right?), and follow these instructions to run
schema.mysql-4.0-4.1.pl.

You can easily get those UTF8 modify commands like this:
 
        perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | grep
MODIFY.*utf8


Of course, you still need to fix the NOT NULL DEFAULT NULL issue. So,
the full command:

        perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
        grep MODIFY.*utf8 | \
        perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
        mysql -urt_user -prt_pass rt

Then, run schema.mysql-4.0-4.1.pl normally, the columns that were fixed
already won't be refixed by the upgrade script again.

        perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
        perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
        mysql -urt_user -prt_pass rt


-Mathieu
_______________________________________________
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com

Reply via email to