Lines 9658-9667
if(CheckVersion($DBversion)) {
Link Here
|
9658 |
|
9658 |
|
9659 |
$DBversion = "3.19.00.006"; |
9659 |
$DBversion = "3.19.00.006"; |
9660 |
if ( CheckVersion($DBversion) ) { |
9660 |
if ( CheckVersion($DBversion) ) { |
9661 |
$dbh->do(q|SET foreign_key_checks = 0|);; |
9661 |
$dbh->do(q|SET foreign_key_checks = 0|); |
9662 |
my @tables = $dbh->tables(); |
9662 |
my $sth = $dbh->table_info( '','','','TABLE' ); |
9663 |
for my $table ( @tables ) { |
9663 |
my ( $cat, $schema, $name, $type, $remarks ); |
9664 |
$dbh->do(qq|ALTER TABLE $table CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci|); |
9664 |
while ( ( $cat, $schema, $name, $type, $remarks ) = $sth->fetchrow_array ) { |
|
|
9665 |
my $table_sth = $dbh->prepare(qq|SHOW CREATE TABLE $name|); |
9666 |
$table_sth->execute; |
9667 |
my @table = $table_sth->fetchrow_array; |
9668 |
unless ( $table[1] =~ /COLLATE=utf8/ ) { #catches utf8 and utf8mb4 tables |
9669 |
$dbh->do(qq|ALTER TABLE $name CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci|); |
9670 |
} |
9665 |
} |
9671 |
} |
9666 |
$dbh->do(q|SET foreign_key_checks = 1|);; |
9672 |
$dbh->do(q|SET foreign_key_checks = 1|);; |
9667 |
|
9673 |
|
9668 |
- |
|
|