Add a JSON default to fieldPrice so ThingyRecord won't die decoding empty JSON strings

This commit is contained in:
Colin Kuskie 2009-07-22 16:41:26 +00:00
parent b7bde582a6
commit b231bbd89d
2 changed files with 11 additions and 0 deletions

View file

@ -24,6 +24,7 @@
- fixed #10685: i18n Asset_StoryTopic::rssUrl
- fixed #10686: Can't access Database Links
- fixed #10650: Unflatten WebGUI storage locations
- fixed #10664: ThiingyRecord disappeared... sort of
7.7.15
- fixed #10629: WebGUI::ProfileField create new field bug

View file

@ -31,6 +31,7 @@ my $quiet; # this line required
my $session = start(); # this line required
replaceUsageOfOldTemplatesAgain($session);
updatePayPalDriversAgain($session);
addThingyRecordFieldPriceDefaults($session);
# upgrade functions go here
@ -92,6 +93,15 @@ sub replaceUsageOfOldTemplatesAgain {
print "DONE!\n" unless $quiet;
}
#----------------------------------------------------------------------------
sub addThingyRecordFieldPriceDefaults {
my $session = shift;
print "\tAdd default fieldPrice JSON to ThingyRecord... " unless $quiet;
# and here's our code
$session->db->write(q|UPDATE ThingyRecord set fieldPrice='{}' where fieldPrice IS NULL|);
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
#----------------------------------------------------------------------------