Use UTF8 for database connection when connecting to MySQL

This commit is contained in:
Graham Knop 2008-03-07 17:45:19 +00:00
parent 4a93766bf9
commit d9d524a2fe
4 changed files with 18 additions and 3 deletions

View file

@ -22,11 +22,18 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
convertCacheToBinary($session);
finish($session); # this line required
sub convertCacheToBinary {
my $session = shift;
print "\tConverting database cache to binary data.\n" unless ($quiet);
$session->db->write('ALTER TABLE `cache` MODIFY COLUMN `content` mediumblob');
$session->db->write('DELETE FROM `cache`');
}
##-------------------------------------------------
#sub exampleFunction {
# my $session = shift;