mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 00:02:18 +02:00
[ticket/14754] Refactor migration for 3.3 and use ULINT
PHPBB3-14754
This commit is contained in:
parent
cc3afd87aa
commit
c61946329c
@ -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
|
||||
{
|
||||
static public function depends_on()
|
||||
{
|
||||
return array(
|
||||
'\phpbb\db\migration\data\v32x\v323',
|
||||
);
|
||||
return [
|
||||
'\phpbb\db\migration\data\v330\v330',
|
||||
];
|
||||
}
|
||||
|
||||
public function update_schema()
|
||||
{
|
||||
return array(
|
||||
'add_tables' => array(
|
||||
$this->table_prefix . 'email_notifications' => array(
|
||||
'COLUMNS' => array(
|
||||
'notification_type_id' => array('USINT', 0),
|
||||
'item_id' => array('UINT', 0),
|
||||
'item_parent_id' => array('UINT', 0),
|
||||
'user_id' => array('UINT', 0),
|
||||
),
|
||||
'PRIMARY_KEY' => array('notification_type_id', 'item_id', 'item_parent_id', 'user_id'),
|
||||
),
|
||||
),
|
||||
);
|
||||
return [
|
||||
'add_tables' => [
|
||||
$this->table_prefix . 'email_notifications' => [
|
||||
'COLUMNS' => [
|
||||
'notification_type_id' => ['USINT', 0],
|
||||
'item_id' => ['ULINT', 0],
|
||||
'item_parent_id' => ['ULINT', 0],
|
||||
'user_id' => ['ULINT', 0],
|
||||
],
|
||||
'PRIMARY_KEY' => ['notification_type_id', 'item_id', 'item_parent_id', 'user_id'],
|
||||
],
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
public function revert_schema()
|
||||
{
|
||||
return array(
|
||||
'drop_tables' => array(
|
||||
$this->table_prefix . 'email_notifications',
|
||||
),
|
||||
);
|
||||
return [
|
||||
'drop_tables' => [$this->table_prefix . 'email_notifications'],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user