Move StoryTopic upgrade sub for storySortOrder into the present release, instead of the previous one.
This commit is contained in:
parent
ea1bb5f714
commit
6130165282
2 changed files with 20 additions and 20 deletions
|
|
@ -31,6 +31,7 @@ my $quiet; # this line required
|
||||||
my $session = start(); # this line required
|
my $session = start(); # this line required
|
||||||
|
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
|
alterStoryTopicTable($session);
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
@ -44,6 +45,25 @@ finish($session); # this line required
|
||||||
# print "DONE!\n" unless $quiet;
|
# print "DONE!\n" unless $quiet;
|
||||||
#}
|
#}
|
||||||
|
|
||||||
|
#----------------------------------------------------------------------------
|
||||||
|
# Describe what our function does
|
||||||
|
sub alterStoryTopicTable {
|
||||||
|
my $session = shift;
|
||||||
|
print "\tAdd story sort order column to the StoryTopic table... " unless $quiet;
|
||||||
|
|
||||||
|
my $sth = $session->db->read('DESCRIBE `StoryTopic`');
|
||||||
|
while (my ($col) = $sth->array) {
|
||||||
|
if ($col eq 'storySortOrder') {
|
||||||
|
print "Skipped.\n" unless $quiet;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$session->db->write("ALTER TABLE StoryTopic ADD COLUMN storySortOrder CHAR(22)");
|
||||||
|
$session->db->write("UPDATE StoryTopic SET storySortOrder = 'Chronologically' WHERE storySortOrder IS NULL");
|
||||||
|
print "DONE!\n" unless $quiet;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,6 @@ my $session = start(); # this line required
|
||||||
# upgrade functions go here
|
# upgrade functions go here
|
||||||
addSpamStopWordsToConfig($session);
|
addSpamStopWordsToConfig($session);
|
||||||
alterStoryArchiveTable($session);
|
alterStoryArchiveTable($session);
|
||||||
alterStoryTopicTable($session);
|
|
||||||
|
|
||||||
finish($session); # this line required
|
finish($session); # this line required
|
||||||
|
|
||||||
|
|
@ -75,25 +74,6 @@ sub alterStoryArchiveTable {
|
||||||
print "DONE!\n" unless $quiet;
|
print "DONE!\n" unless $quiet;
|
||||||
}
|
}
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
|
||||||
# Describe what our function does
|
|
||||||
sub alterStoryTopicTable {
|
|
||||||
my $session = shift;
|
|
||||||
print "\tAdd story sort order column to the StoryTopic table... " unless $quiet;
|
|
||||||
|
|
||||||
my $sth = $session->db->read('DESCRIBE `StoryTopic`');
|
|
||||||
while (my ($col) = $sth->array) {
|
|
||||||
if ($col eq 'storySortOrder') {
|
|
||||||
print "Skipped.\n" unless $quiet;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$session->db->write("ALTER TABLE StoryTopic ADD COLUMN storySortOrder CHAR(22)");
|
|
||||||
$session->db->write("UPDATE StoryTopic SET storySortOrder = 'Chronologically' WHERE storySortOrder IS NULL");
|
|
||||||
print "DONE!\n" unless $quiet;
|
|
||||||
}
|
|
||||||
|
|
||||||
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
|
||||||
|
|
||||||
#----------------------------------------------------------------------------
|
#----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue