Modify default config file.

Upgrade script adds Story Manager assets to site config files.
This commit is contained in:
Colin Kuskie 2009-02-27 22:25:47 +00:00
parent b20f4b4a08
commit 5009c96c32
2 changed files with 38 additions and 9 deletions

View file

@ -32,6 +32,7 @@ my $session = start(); # this line required
# upgrade functions go here # upgrade functions go here
installStoryManagerTables($session); installStoryManagerTables($session);
upgradeConfigFiles($session);
finish($session); # this line required finish($session); # this line required
@ -66,15 +67,16 @@ EOSTORY
$db->write(<<EOARCHIVE); $db->write(<<EOARCHIVE);
CREATE TABLE StoryArchive ( CREATE TABLE StoryArchive (
assetId CHAR(22) BINARY NOT NULL, assetId CHAR(22) BINARY NOT NULL,
revisionDate BIGINT NOT NULL, revisionDate BIGINT NOT NULL,
storiesPerFeed INTEGER, storiesPerFeed INTEGER,
storiesPerPage INTEGER, storiesPerPage INTEGER,
groupToPost CHAR(22) BINARY, groupToPost CHAR(22) BINARY,
templateId CHAR(22) BINARY, templateId CHAR(22) BINARY,
storyTemplateId CHAR(22) BINARY, storyTemplateId CHAR(22) BINARY,
archiveAfter INT(11), editStoryTemplateId CHAR(22) BINARY,
richEditorId CHAR(22) BINARY, archiveAfter INT(11),
richEditorId CHAR(22) BINARY,
PRIMARY KEY ( assetId, revisionDate ) PRIMARY KEY ( assetId, revisionDate )
) )
EOARCHIVE EOARCHIVE
@ -93,6 +95,26 @@ EOTOPIC
print "DONE!\n" unless $quiet; print "DONE!\n" unless $quiet;
} }
sub upgradeConfigFiles {
my ($session) = @_;
print "\tAdding Story Manager assets to config file... " unless $quiet;
my $config = $session->config;
$config->addToHash(
'assets',
'WebGUI::Asset::Wobject::StoryTopic' => {
'category' => 'community'
},
);
$config->addToHash(
'assets',
"WebGUI::Asset::Wobject::StoryArchive" => {
"isContainer" => 1,
"category" => "community"
},
);
print "DONE!\n" unless $quiet;
}
# -------------- DO NOT EDIT BELOW THIS LINE -------------------------------- # -------------- DO NOT EDIT BELOW THIS LINE --------------------------------
#---------------------------------------------------------------------------- #----------------------------------------------------------------------------

View file

@ -502,6 +502,13 @@
"isContainer" : 1, "isContainer" : 1,
"category" : "community" "category" : "community"
}, },
"WebGUI::Asset::Wobject::StoryArchive" : {
"isContainer" : 1,
"category" : "community"
},
"WebGUI::Asset::Wobject::StoryTopic" : {
"category" : "community"
},
"WebGUI::Asset::Wobject::StockData" : { "WebGUI::Asset::Wobject::StockData" : {
"category" : "intranet" "category" : "intranet"
}, },