[ Index ] |
PHP Cross Reference of phpBB-3.1.12-deutsch |
[Summary view] [Print] [Text view]
1 <?php 2 /** 3 * 4 * This file is part of the phpBB Forum Software package. 5 * 6 * @copyright (c) phpBB Limited <https://www.phpbb.com> 7 * @license GNU General Public License, version 2 (GPL-2.0) 8 * 9 * For full copyright and license information, please see 10 * the docs/CREDITS.txt file. 11 * 12 */ 13 14 namespace phpbb\db\migration\data\v310; 15 16 class notifications extends \phpbb\db\migration\migration 17 { 18 public function effectively_installed() 19 { 20 return $this->db_tools->sql_table_exists($this->table_prefix . 'notifications'); 21 } 22 23 static public function depends_on() 24 { 25 return array('\phpbb\db\migration\data\v310\dev'); 26 } 27 28 public function update_schema() 29 { 30 return array( 31 'add_tables' => array( 32 $this->table_prefix . 'notification_types' => array( 33 'COLUMNS' => array( 34 'notification_type' => array('VCHAR:255', ''), 35 'notification_type_enabled' => array('BOOL', 1), 36 ), 37 'PRIMARY_KEY' => array('notification_type', 'notification_type_enabled'), 38 ), 39 $this->table_prefix . 'notifications' => array( 40 'COLUMNS' => array( 41 'notification_id' => array('UINT', null, 'auto_increment'), 42 'item_type' => array('VCHAR:255', ''), 43 'item_id' => array('UINT', 0), 44 'item_parent_id' => array('UINT', 0), 45 'user_id' => array('UINT', 0), 46 'notification_read' => array('BOOL', 0), 47 'notification_time' => array('TIMESTAMP', 1), 48 'notification_data' => array('TEXT_UNI', ''), 49 ), 50 'PRIMARY_KEY' => 'notification_id', 51 'KEYS' => array( 52 'item_ident' => array('INDEX', array('item_type', 'item_id')), 53 'user' => array('INDEX', array('user_id', 'notification_read')), 54 ), 55 ), 56 $this->table_prefix . 'user_notifications' => array( 57 'COLUMNS' => array( 58 'item_type' => array('VCHAR:255', ''), 59 'item_id' => array('UINT', 0), 60 'user_id' => array('UINT', 0), 61 'method' => array('VCHAR:255', ''), 62 'notify' => array('BOOL', 1), 63 ), 64 ), 65 ), 66 ); 67 } 68 69 public function revert_schema() 70 { 71 return array( 72 'drop_tables' => array( 73 $this->table_prefix . 'notification_types', 74 $this->table_prefix . 'notifications', 75 $this->table_prefix . 'user_notifications', 76 ), 77 ); 78 } 79 80 public function update_data() 81 { 82 return array( 83 array('module.add', array( 84 'ucp', 85 'UCP_MAIN', 86 array( 87 'module_basename' => 'ucp_notifications', 88 'modes' => array('notification_list'), 89 ), 90 )), 91 array('module.add', array( 92 'ucp', 93 'UCP_PREFS', 94 array( 95 'module_basename' => 'ucp_notifications', 96 'modes' => array('notification_options'), 97 ), 98 )), 99 array('config.add', array('load_notifications', 1)), 100 ); 101 } 102 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Thu Jan 11 00:25:41 2018 | Cross-referenced by PHPXref 0.7.1 |