Modify default config file.
Upgrade script adds Story Manager assets to site config files.
This commit is contained in:
parent
b20f4b4a08
commit
5009c96c32
2 changed files with 38 additions and 9 deletions
|
|
@ -32,6 +32,7 @@ my $session = start(); # this line required
|
|||
|
||||
# upgrade functions go here
|
||||
installStoryManagerTables($session);
|
||||
upgradeConfigFiles($session);
|
||||
|
||||
finish($session); # this line required
|
||||
|
||||
|
|
@ -66,15 +67,16 @@ EOSTORY
|
|||
|
||||
$db->write(<<EOARCHIVE);
|
||||
CREATE TABLE StoryArchive (
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
storiesPerFeed INTEGER,
|
||||
storiesPerPage INTEGER,
|
||||
groupToPost CHAR(22) BINARY,
|
||||
templateId CHAR(22) BINARY,
|
||||
storyTemplateId CHAR(22) BINARY,
|
||||
archiveAfter INT(11),
|
||||
richEditorId CHAR(22) BINARY,
|
||||
assetId CHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
storiesPerFeed INTEGER,
|
||||
storiesPerPage INTEGER,
|
||||
groupToPost CHAR(22) BINARY,
|
||||
templateId CHAR(22) BINARY,
|
||||
storyTemplateId CHAR(22) BINARY,
|
||||
editStoryTemplateId CHAR(22) BINARY,
|
||||
archiveAfter INT(11),
|
||||
richEditorId CHAR(22) BINARY,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
EOARCHIVE
|
||||
|
|
@ -93,6 +95,26 @@ EOTOPIC
|
|||
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 --------------------------------
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -502,6 +502,13 @@
|
|||
"isContainer" : 1,
|
||||
"category" : "community"
|
||||
},
|
||||
"WebGUI::Asset::Wobject::StoryArchive" : {
|
||||
"isContainer" : 1,
|
||||
"category" : "community"
|
||||
},
|
||||
"WebGUI::Asset::Wobject::StoryTopic" : {
|
||||
"category" : "community"
|
||||
},
|
||||
"WebGUI::Asset::Wobject::StockData" : {
|
||||
"category" : "intranet"
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue