added: DataTable asset
This commit is contained in:
parent
828930d193
commit
3e1f66a0e7
9 changed files with 1638 additions and 0 deletions
BIN
docs/upgrades/packages-7.6.2/datatable.wgpkg
Normal file
BIN
docs/upgrades/packages-7.6.2/datatable.wgpkg
Normal file
Binary file not shown.
|
|
@ -37,8 +37,54 @@ upgradeToYui26($session);
|
|||
addUsersOnlineMacro($session);
|
||||
addProfileExtrasField($session);
|
||||
addWorkflowToDataform( $session );
|
||||
installDataTableAsset( $session );
|
||||
installAjaxI18N( $session );
|
||||
finish($session); # this line required
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# installDataTableAsset
|
||||
# Install the asset by creating the DB table and adding it to the config file
|
||||
sub installDataTableAsset {
|
||||
my $session = shift;
|
||||
print "\tInstalling the DataTable asset... " unless $quiet;
|
||||
|
||||
$session->db->write( <<'ENDSQL' );
|
||||
CREATE TABLE DataTable (
|
||||
assetId VARCHAR(22) BINARY NOT NULL,
|
||||
revisionDate BIGINT NOT NULL,
|
||||
data LONGTEXT,
|
||||
templateId VARCHAR(22) BINARY,
|
||||
PRIMARY KEY ( assetId, revisionDate )
|
||||
)
|
||||
ENDSQL
|
||||
|
||||
my $assets = $session->config->get( "assets" );
|
||||
$assets->{ "WebGUI::Asset::Wobject::DataTable" } = { category => "basic" };
|
||||
$session->config->set( "assets", $assets );
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
# installDataTableAsset
|
||||
# Install the content handler by adding it to the config file
|
||||
sub installAjaxI18N {
|
||||
my $session = shift;
|
||||
print "\tInstalling the AjaxI18N content handler... " unless $quiet;
|
||||
|
||||
my $oldHandlers = $session->config->get( "contentHandlers" );
|
||||
my @newHandlers;
|
||||
for my $handler ( @{ $oldHandlers } ) {
|
||||
if ( $handler eq "WebGUI::Content::Operation" ) {
|
||||
push @newHandlers, "WebGUI::Content::AjaxI18N";
|
||||
}
|
||||
push @newHandlers, $handler;
|
||||
}
|
||||
$session->config->set( "contentHandlers", \@newHandlers );
|
||||
|
||||
print "DONE!\n" unless $quiet;
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub upgradeToYui26 {
|
||||
my $session = shift;
|
||||
|
|
@ -195,6 +241,7 @@ sub updateTemplates {
|
|||
my @files = readdir(DIR);
|
||||
closedir(DIR);
|
||||
my $newFolder = undef;
|
||||
$session->db->write( "UPDATE asset SET parentId='infinityandbeyond' WHERE assetId='pbversion0000000000001'" );
|
||||
foreach my $file (@files) {
|
||||
next unless ($file =~ /\.wgpkg$/);
|
||||
# Fix the filename to include a path
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue