Turn subscribe part of NewsletterCollection into an aspect.
This commit is contained in:
parent
1167a11ba7
commit
22c900047f
3 changed files with 268 additions and 225 deletions
|
|
@ -20,6 +20,7 @@ GetOptions(
|
|||
|
||||
my $session = start( $webguiRoot, $configFile );
|
||||
|
||||
installSubscriberAspectTable( $session );
|
||||
installMailableAspectTable( $session );
|
||||
installNewsletterCollection( $session );
|
||||
installMailingTables( $session );
|
||||
|
|
@ -46,6 +47,24 @@ EOSQL
|
|||
print "Done.\n";
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub installSubscriberAspectTable {
|
||||
my $session = shift;
|
||||
print "\tCreating Subscriber aspect table...";
|
||||
|
||||
$session->db->write(<<EOSQL);
|
||||
create table if not exists assetAspectSubscriber (
|
||||
assetId char(22) binary not null,
|
||||
revisionDate bigint(20) not null,
|
||||
subscriptionEnabled tinyint(1) not null default 0,
|
||||
alwaysConfirmSubscription tinyint(1) not null default 0,
|
||||
primary key( assetId, revisionDate )
|
||||
);
|
||||
EOSQL
|
||||
|
||||
print "Done.\n";
|
||||
}
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
sub installNewsletterCollection {
|
||||
my $session = shift;
|
||||
|
|
@ -55,7 +74,6 @@ sub installNewsletterCollection {
|
|||
create table if not exists NewsletterCollection (
|
||||
assetId char(22) binary not null,
|
||||
revisionDate bigint(20) not null,
|
||||
alwaysConfirmSubscription tinyint(1) not null default 0,
|
||||
primary key( assetId, revisionDate )
|
||||
);
|
||||
EOSQL
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue