1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-24 02:21:43 +02:00

[ticket/14754] Refactor migration for 3.3 and use ULINT

PHPBB3-14754
This commit is contained in:
Marc Alexander
2020-03-15 12:50:39 +01:00
parent cc3afd87aa
commit c61946329c

View File

@@ -11,40 +11,38 @@
* *
*/ */
namespace phpbb\db\migration\data\v32x; namespace phpbb\db\migration\data\v33x;
class add_email_notifications_table extends \phpbb\db\migration\migration class add_email_notifications_table extends \phpbb\db\migration\migration
{ {
static public function depends_on() static public function depends_on()
{ {
return array( return [
'\phpbb\db\migration\data\v32x\v323', '\phpbb\db\migration\data\v330\v330',
); ];
} }
public function update_schema() public function update_schema()
{ {
return array( return [
'add_tables' => array( 'add_tables' => [
$this->table_prefix . 'email_notifications' => array( $this->table_prefix . 'email_notifications' => [
'COLUMNS' => array( 'COLUMNS' => [
'notification_type_id' => array('USINT', 0), 'notification_type_id' => ['USINT', 0],
'item_id' => array('UINT', 0), 'item_id' => ['ULINT', 0],
'item_parent_id' => array('UINT', 0), 'item_parent_id' => ['ULINT', 0],
'user_id' => array('UINT', 0), 'user_id' => ['ULINT', 0],
), ],
'PRIMARY_KEY' => array('notification_type_id', 'item_id', 'item_parent_id', 'user_id'), 'PRIMARY_KEY' => ['notification_type_id', 'item_id', 'item_parent_id', 'user_id'],
), ],
), ],
); ];
} }
public function revert_schema() public function revert_schema()
{ {
return array( return [
'drop_tables' => array( 'drop_tables' => [$this->table_prefix . 'email_notifications'],
$this->table_prefix . 'email_notifications', ];
),
);
} }
} }