fixed #11060: Some tables have latin1 as the default character set

This commit is contained in:
Graham Knop 2009-10-07 18:01:49 -05:00
parent 65a58eed62
commit af447ea570
2 changed files with 24 additions and 1 deletions

View file

@ -1,6 +1,7 @@
7.8.2
- fixed #11098: Leaving a version tag makes everyone leave
- fixed #11096: Error on deleting FAQ(CS)-item
- fixed #11060: Some tables have latin1 as the default character set
7.8.1
- mark $session->datetime->time as deprecated and remove its use from core code

View file

@ -30,7 +30,7 @@ my $quiet; # this line required
my $session = start(); # this line required
# upgrade functions go here
fixTableDefaultCharsets($session);
finish($session); # this line required
@ -44,6 +44,28 @@ finish($session); # this line required
# print "DONE!\n" unless $quiet;
#}
#----------------------------------------------------------------------------
sub fixTableDefaultCharsets {
my $session = shift;
my $db = $session->db;
print "\tFixing default character set on tables... " unless $quiet;
my @tables = qw(
Carousel Collaboration DataTable Map MapPoint MatrixListing
MatrixListing_attribute Story StoryArchive StoryTopic
Survey_questionTypes Survey_test ThingyRecord ThingyRecord_record
adSkuPurchase assetAspectComments assetAspectRssFeed
filePumpBundle inbox_messageState taxDriver tax_eu_vatNumbers
template_attachments
);
for my $table (@tables) {
$db->write(
sprintf('ALTER TABLE %s DEFAULT CHARACTER SET = ?', $db->dbh->quote_identifier($table)),
['utf8'],
);
}
# and here's our code
print "Done.\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------