fixed #11060: Some tables have latin1 as the default character set
This commit is contained in:
parent
65a58eed62
commit
af447ea570
2 changed files with 24 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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 --------------------------------
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue