From 9da560dac007f09bf0300864d1c96a811972c5cb Mon Sep 17 00:00:00 2001 From: Max Kremmel Date: Sun, 29 Jan 2006 19:07:19 +0000 Subject: add BWR1 --> BWR2 to upgrade path --- admin/schema_inc.php | 46 +++++++++++++++++++++++----------------------- admin/upgrade_inc.php | 34 +++++++++++++++++++++++++++++++--- 2 files changed, 54 insertions(+), 26 deletions(-) diff --git a/admin/schema_inc.php b/admin/schema_inc.php index 944a804..383435d 100644 --- a/admin/schema_inc.php +++ b/admin/schema_inc.php @@ -3,32 +3,32 @@ $tables = array( 'messu_messages' => " - msg_id I4 AUTO PRIMARY, - to_user_id I4 NOTNULL, - from_user_id I4 NOTNULL, - msg_to X, - msg_cc X, - msg_bcc X, - subject C(255), - body X, - hash C(32), - date I8, - is_read C(1), - is_replied C(1), - is_flagged C(1), - group_id I4 - priority I4 + msg_id I4 AUTO PRIMARY, + to_user_id I4 NOTNULL, + from_user_id I4 NOTNULL, + msg_to X, + msg_cc X, + msg_bcc X, + subject C(255), + body X, + hash C(32), + date I8, + is_read C(1), + is_replied C(1), + is_flagged C(1), + group_id I4 + priority I4 ", 'messu_system_message_map' => " - msg_id I4, - to_user_id I4 NOTNULL, - is_read C(1), - is_flagged C(1), - is_replied C(1), - priority I4, - is_hidden C(1) - CONSTRAINTS ', CONSTRAINT `tiki_messu_system_message_ref` FOREIGN KEY (`msg_id`) REFERENCES `".BIT_DB_PREFIX."messu_messages` (`msg_id`)' + msg_id I4, + to_user_id I4 NOTNULL, + is_read C(1), + is_flagged C(1), + is_replied C(1), + priority I4, + is_hidden C(1) + CONSTRAINTS ', CONSTRAINT `tiki_messu_system_message_ref` FOREIGN KEY (`msg_id`) REFERENCES `".BIT_DB_PREFIX."messu_messages` (`msg_id`)' " // CONSTRAINT ', CONSTRAINT tiki_messu_to_user_ref FOREIGN KEY (to_user_id) REFERENCES `".BIT_DB_PREFIX."users_users` (user_id) diff --git a/admin/upgrade_inc.php b/admin/upgrade_inc.php index fd1e8d6..ee29152 100644 --- a/admin/upgrade_inc.php +++ b/admin/upgrade_inc.php @@ -20,8 +20,8 @@ array( 'RENAMECOLUMN' => array( )), array( 'ALTER' => array( 'messu_messages' => array( - 'to_user_id' => array( '`to_user_id`', 'I4' ), // , 'NOTNULL' ), - 'from_user_id' => array( '`from_user_id`', 'I4' ), // , 'NOTNULL' ), + 'to_user_id' => array( '`to_user_id`', 'I4' ), + 'from_user_id' => array( '`from_user_id`', 'I4' ), ), )) )), @@ -42,7 +42,35 @@ array( 'DATADICT' => array( )), ) -) +), + + + +// next upgrade path +'BWR1' => array( + 'BWR2' => array( + +array( 'DATADICT' => array( + array( 'CREATE' => array ( + 'messu_system_message_map' => " + msg_id I4, + to_user_id I4 NOTNULL, + is_read C(1), + is_flagged C(1), + is_replied C(1), + priority I4, + is_hidden C(1) + CONSTRAINTS ', CONSTRAINT `tiki_messu_system_message_ref` FOREIGN KEY (`msg_id`) REFERENCES `".BIT_DB_PREFIX."messu_messages` (`msg_id`)' + " + )), + array( 'ALTER' => array( + 'messu_messages' => array( + 'group_id' => array( '`group_id`', 'I4' ), + ), + )) +)), + + ), ); if( isset( $upgrades[$gUpgradeFrom][$gUpgradeTo] ) ) { -- cgit v1.3