38 lines
703 B
PHP
Executable file
38 lines
703 B
PHP
Executable file
<?php
|
|
|
|
namespace pedodev\tagging\migrations;
|
|
|
|
class dev_4 extends \phpbb\db\migration\migration
|
|
{
|
|
static public function depends_on()
|
|
{
|
|
return ['\phpbb\db\migration\data\v330\v330'];
|
|
}
|
|
|
|
public function update_schema()
|
|
{
|
|
return [
|
|
|
|
'add_tables' => [
|
|
$this->table_prefix . 'content_tags' => [
|
|
'COLUMNS' => [
|
|
'id' => ['ULINT', NULL, 'auto_increment'],
|
|
'post_id' => ['ULINT', 0, 'NON-NULL'],
|
|
'tag_id' => ['USINT', 0, 'NON-NULL'],
|
|
],
|
|
'PRIMARY_KEY' => 'id',
|
|
],
|
|
],
|
|
|
|
];
|
|
}
|
|
|
|
public function revert_schema()
|
|
{
|
|
return [
|
|
'drop_tables' => [
|
|
$this->table_prefix . 'content_tags',
|
|
],
|
|
];
|
|
}
|
|
}
|