diff options
| author | Christian Fowler <spider@viovio.com> | 2006-02-04 16:56:06 +0000 |
|---|---|---|
| committer | Christian Fowler <spider@viovio.com> | 2006-02-04 16:56:06 +0000 |
| commit | f7af3930f35011035f2876382e31f482cb56653c (patch) | |
| tree | ada000221d49e54855446a5c2eeb5f7d6d4a9d98 /admin/schema_inc.php | |
| parent | cfb71170e310f84f6aa082672e7cd9ba9067cc57 (diff) | |
| download | newsletters-f7af3930f35011035f2876382e31f482cb56653c.tar.gz newsletters-f7af3930f35011035f2876382e31f482cb56653c.tar.bz2 newsletters-f7af3930f35011035f2876382e31f482cb56653c.zip | |
masse fixing of schema CONSTRAINTs. they seem to work now that adodb has decided to change CONSTRAINTS back to CONSTRAINT
Diffstat (limited to 'admin/schema_inc.php')
| -rw-r--r-- | admin/schema_inc.php | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/admin/schema_inc.php b/admin/schema_inc.php index 2450136..bb771ac 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -11,7 +11,7 @@ $tables = array( unsub_msg C(1) default 'y', validate_addr C(1) default 'y', frequency I8 - CONSTRAINTS ', CONSTRAINT `tiki_nl_ed_con_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )' + CONSTRAINT ', CONSTRAINT `tiki_nl_ed_con_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )' ", 'newsletters_editions' => " @@ -20,7 +20,7 @@ $tables = array( is_draft C(1), reply_to C(160), content_id I4 NOTNULL - CONSTRAINTS ', CONSTRAINT `tiki_nl_ed_nl_con_ref` FOREIGN KEY (`nl_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` ) + CONSTRAINT ', CONSTRAINT `tiki_nl_ed_nl_con_ref` FOREIGN KEY (`nl_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` ) , CONSTRAINT `tiki_nl_ed_con_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )' ", @@ -31,8 +31,8 @@ $tables = array( response_content_id I4, unsubscribe_all C(1), unsubscribe_date I8 - CONSTRAINTS ', CONSTRAINT `mail_unsub_con_ref` FOREIGN KEY (`unsub_content_id`) REFERENCES `".BIT_DB_PREFIX."newsletters`( `unsub_content_id` ), - , CONSTRAINT `mail_unsub_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users`( `user_id` )' + CONSTRAINT ', CONSTRAINT `mail_unsub_con_ref` FOREIGN KEY (`response_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` ) + , CONSTRAINT `mail_unsub_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users`( `user_id` )' ", 'mail_errors' => " @@ -42,7 +42,7 @@ $tables = array( content_id I4, error_date I8, error_message X - CONSTRAINTS ', CONSTRAINT `mail_err_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users`( `user_id` )' + CONSTRAINT ', CONSTRAINT `mail_err_user_ref` FOREIGN KEY (`user_id`) REFERENCES `".BIT_DB_PREFIX."users_users`( `user_id` )' ", 'mail_mailings' => " @@ -50,7 +50,7 @@ $tables = array( queue_date I8, send_date I8, emails_sent I8 - CONSTRAINTS ', CONSTRAINT `mail_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` ( `content_id` )' + CONSTRAINT ', CONSTRAINT `mail_content_ref` FOREIGN KEY (`content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content` ( `content_id` )' ", 'mail_queue' => " @@ -64,8 +64,7 @@ $tables = array( sent_date I8, last_read_date I8, reads I2 NOTNULL DEFAULT '0' - CONSTRAINTS ', CONSTRAINT `tiki_nl_mailq_ed_ref` FOREIGN KEY (`edition_id`) REFERENCES `".BIT_DB_PREFIX."newsletters_editions`( `edition_id` ), - , CONSTRAINT `tiki_nl_mailq_user_ref` FOREIGN KEY (`users_id`) REFERENCES `".BIT_DB_PREFIX."users_users`( `users_id` )' + CONSTRAINT ', CONSTRAINT `mailq_content_ref` FOREIGN KEY (`nl_content_id`) REFERENCES `".BIT_DB_PREFIX."liberty_content`( `content_id` )' " ); @@ -86,15 +85,15 @@ $gBitInstaller->registerPackageInfo( NEWSLETTERS_PKG_NAME, array( // ### Indexes $indices = array ( - 'nl_sub_nl_idx' => array( 'table' => 'mail_subscriptions', 'cols' => 'nl_id', 'opts' => NULL ), - 'nl_sub_group_idx' => array( 'table' => 'mail_subscriptions', 'cols' => 'group_id', 'opts' => NULL ), - 'nl_sub_email_idx' => array( 'table' => 'mail_subscriptions', 'cols' => 'email', 'opts' => NULL ), - 'nl_ed_nl_idx' => array( 'table' => 'newsletters_editions', 'cols' => 'nl_id', 'opts' => NULL ), - //'nl_group_nl_idx' => array( 'table' => 'newsletter_groups', 'cols' => 'nl_id', 'opts' => NULL ), - 'mq_email_idx' => array( 'table' => 'mail_queue', 'cols' => 'email', 'opts' => NULL ), - 'mq_user_idx' => array( 'table' => 'mail_queue', 'cols' => 'user_id', 'opts' => NULL ), - 'mq_content_idx' => array( 'table' => 'mail_queue', 'cols' => 'content_id', 'opts' => NULL ), - 'mq_sent_idx' => array( 'table' => 'mail_queue', 'cols' => 'sent_date', 'opts' => NULL ), + 'mail_sub_nl_idx' => array( 'table' => 'mail_subscriptions', 'cols' => 'nl_content_id', 'opts' => NULL ), + 'mail_sub_user_idx' => array( 'table' => 'mail_subscriptions', 'cols' => 'user_id', 'opts' => NULL ), + 'mail_sub_email_idx' => array( 'table' => 'mail_subscriptions', 'cols' => 'email', 'opts' => NULL ), + 'nl_ed_nl_idx' => array( 'table' => 'newsletters_editions', 'cols' => 'nl_content_id', 'opts' => NULL ), + 'nl_ed_content_idx' => array( 'table' => 'newsletters_editions', 'cols' => 'content_id', 'opts' => NULL ), + 'mailq_email_idx' => array( 'table' => 'mail_queue', 'cols' => 'email', 'opts' => NULL ), + 'mailq_user_idx' => array( 'table' => 'mail_queue', 'cols' => 'user_id', 'opts' => NULL ), + 'mailq_content_idx' => array( 'table' => 'mail_queue', 'cols' => 'content_id', 'opts' => NULL ), + 'mailq_sent_idx' => array( 'table' => 'mail_queue', 'cols' => 'sent_date', 'opts' => NULL ), ); $gBitInstaller->registerSchemaIndexes( LIBERTY_PKG_NAME, $indices ); |
