Use UTF8 for database connection when connecting to MySQL
This commit is contained in:
parent
4a93766bf9
commit
d9d524a2fe
4 changed files with 18 additions and 3 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue