diff options
author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-04-28 22:53:05 -0500 |
---|---|---|
committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-04-28 22:53:05 -0500 |
commit | 198b992dcef0a0a7099eb3db6185d567b58b6e5a (patch) | |
tree | f1656b2b8a4bf170e2ad348b088e8febf7627194 /phpBB/develop | |
parent | c182ab0e7b2739ff70fb18611af5e1baa02d81a2 (diff) | |
download | forums-198b992dcef0a0a7099eb3db6185d567b58b6e5a.tar forums-198b992dcef0a0a7099eb3db6185d567b58b6e5a.tar.gz forums-198b992dcef0a0a7099eb3db6185d567b58b6e5a.tar.bz2 forums-198b992dcef0a0a7099eb3db6185d567b58b6e5a.tar.xz forums-198b992dcef0a0a7099eb3db6185d567b58b6e5a.zip |
[ticket/11413] Schema changes and migration file
Notifications tables are dropped because phpBB currently does not have
any way to make the necessary changes to the DB schema (and no release
has yet been made with these changes).
This will fix the following bugs:
PHPBB3-11411
PHPBB3-11413
PHPBB3-11414
PHPBB3-11416
PHPBB3-11420
PHPBB3-11413
Diffstat (limited to 'phpBB/develop')
-rw-r--r-- | phpBB/develop/create_schema_files.php | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/phpBB/develop/create_schema_files.php b/phpBB/develop/create_schema_files.php index b454fb2c16..3121db391d 100644 --- a/phpBB/develop/create_schema_files.php +++ b/phpBB/develop/create_schema_files.php @@ -1317,16 +1317,20 @@ function get_schema_struct() $schema_data['phpbb_notification_types'] = array( 'COLUMNS' => array( - 'notification_type' => array('VCHAR:255', ''), + 'notification_type_id' => array('USINT', NULL, 'auto_increment'), + 'notification_type_name' => array('VCHAR:255', ''), 'notification_type_enabled' => array('BOOL', 1), ), - 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'), + 'PRIMARY_KEY' => array('notification_type_id'), + 'KEYS' => array( + 'type' => array('UNIQUE', array('notification_type_name')), + ), ); $schema_data['phpbb_notifications'] = array( 'COLUMNS' => array( - 'notification_id' => array('UINT', NULL, 'auto_increment'), - 'item_type' => array('VCHAR:255', ''), + 'notification_id' => array('UINT:10', NULL, 'auto_increment'), + 'notification_type_id' => array('USINT', 0), 'item_id' => array('UINT', 0), 'item_parent_id' => array('UINT', 0), 'user_id' => array('UINT', 0), @@ -1336,7 +1340,7 @@ function get_schema_struct() ), 'PRIMARY_KEY' => 'notification_id', 'KEYS' => array( - 'item_ident' => array('INDEX', array('item_type', 'item_id')), + 'item_ident' => array('INDEX', array('notification_type_id', 'item_id')), 'user' => array('INDEX', array('user_id', 'notification_read')), ), ); @@ -1814,12 +1818,12 @@ function get_schema_struct() ); $schema_data['phpbb_user_notifications'] = array( - 'COLUMNS' => array( - 'item_type' => array('VCHAR:255', ''), - 'item_id' => array('UINT', 0), - 'user_id' => array('UINT', 0), - 'method' => array('VCHAR:255', ''), - 'notify' => array('BOOL', 1), + 'COLUMNS' => array( + 'notification_type_id' => array('USINT', 0), + 'item_id' => array('UINT', 0), + 'user_id' => array('UINT', 0), + 'method' => array('VCHAR:255', ''), + 'notify' => array('BOOL', 1), ), ); |