diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index 9a8428f79..641e8c1e2 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -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 diff --git a/docs/upgrades/upgrade_7.8.1-7.8.2.pl b/docs/upgrades/upgrade_7.8.1-7.8.2.pl index bd3f995e0..09fff4e47 100644 --- a/docs/upgrades/upgrade_7.8.1-7.8.2.pl +++ b/docs/upgrades/upgrade_7.8.1-7.8.2.pl @@ -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 --------------------------------