diff options
| author | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-04-29 21:22:07 -0500 |
|---|---|---|
| committer | Nathaniel Guse <nathaniel.guse@gmail.com> | 2013-04-29 21:22:07 -0500 |
| commit | 33287a73609a99f33f3d0718fceaf72e39d5283e (patch) | |
| tree | c6906331d568a7dc3814f1c3def3e9a8ab408d2a /phpBB/includes/db | |
| parent | 4c5e51e379f770d9bd3610e7235dafcb985494e1 (diff) | |
| download | forums-33287a73609a99f33f3d0718fceaf72e39d5283e.tar forums-33287a73609a99f33f3d0718fceaf72e39d5283e.tar.gz forums-33287a73609a99f33f3d0718fceaf72e39d5283e.tar.bz2 forums-33287a73609a99f33f3d0718fceaf72e39d5283e.tar.xz forums-33287a73609a99f33f3d0718fceaf72e39d5283e.zip | |
[ticket/11413] Undo editing the user_notifications table
item_type is not equivalent to notification_type_name, it can be a generic
string (typically used to be able to subscribe to multiple notification
types while only subscribing to one item
PHPBB3-11413
Diffstat (limited to 'phpBB/includes/db')
| -rw-r--r-- | phpBB/includes/db/migration/data/310/notifications2.php | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/phpBB/includes/db/migration/data/310/notifications2.php b/phpBB/includes/db/migration/data/310/notifications2.php index a3f29b073a..cd078f8f60 100644 --- a/phpBB/includes/db/migration/data/310/notifications2.php +++ b/phpBB/includes/db/migration/data/310/notifications2.php @@ -20,7 +20,6 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration 'drop_tables' => array( $this->table_prefix . 'notification_types', $this->table_prefix . 'notifications', - $this->table_prefix . 'user_notifications', ), 'add_tables' => array( $this->table_prefix . 'notification_types' => array( @@ -51,20 +50,6 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration 'user' => array('INDEX', array('user_id', 'notification_read')), ), ), - $this->table_prefix . 'user_notifications' => array( - '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), - ), - 'PRIMARY_KEY' => array( - 'notification_type_id', - 'item_id', - 'user_id', - ), - ), ), ); } @@ -75,7 +60,6 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration 'drop_tables' => array( $this->table_prefix . 'notification_types', $this->table_prefix . 'notifications', - $this->table_prefix . 'user_notifications', ), 'add_tables' => array( $this->table_prefix . 'notification_types' => array( @@ -102,15 +86,6 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration 'user' => array('INDEX', array('user_id', 'notification_read')), ), ), - $this->table_prefix . '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), - ), - ), ), ); } @@ -126,6 +101,9 @@ class phpbb_db_migration_data_310_notifications2 extends phpbb_db_migration { $insert_table = $this->table_prefix . 'user_notifications'; + $sql = 'DELETE FROM ' . $insert_table; + $this->db->sql_query($sql); + $sql = 'SELECT user_id, user_notify_type, user_notify_pm FROM ' . USERS_TABLE; $result = $this->db->sql_query($sql); |
