mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-10 21:38:54 +00:00
Merge pull request #1857 from nickvergessen/ticket/11922
[ticket/11922] Drop all keys before trying to delete columns to avoid issues
This commit is contained in:
commit
3b68540cee
2 changed files with 21 additions and 1 deletions
|
@ -34,7 +34,10 @@ class softdelete_p2 extends \phpbb\db\migration\migration
|
||||||
),
|
),
|
||||||
'drop_keys' => array(
|
'drop_keys' => array(
|
||||||
$this->table_prefix . 'posts' => array('post_approved'),
|
$this->table_prefix . 'posts' => array('post_approved'),
|
||||||
$this->table_prefix . 'topics' => array('forum_appr_last'),
|
$this->table_prefix . 'topics' => array(
|
||||||
|
'forum_appr_last',
|
||||||
|
'topic_approved',
|
||||||
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
@ -63,6 +66,7 @@ class softdelete_p2 extends \phpbb\db\migration\migration
|
||||||
),
|
),
|
||||||
$this->table_prefix . 'topics' => array(
|
$this->table_prefix . 'topics' => array(
|
||||||
'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
|
'forum_appr_last' => array('forum_id', 'topic_approved', 'topic_last_post_id'),
|
||||||
|
'topic_approved' => array('topic_approved'),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
|
@ -24,6 +24,14 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||||
public function update_schema()
|
public function update_schema()
|
||||||
{
|
{
|
||||||
return array(
|
return array(
|
||||||
|
'drop_keys' => array(
|
||||||
|
$this->table_prefix . 'styles' => array(
|
||||||
|
'imageset_id',
|
||||||
|
'template_id',
|
||||||
|
'theme_id',
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
'drop_columns' => array(
|
'drop_columns' => array(
|
||||||
$this->table_prefix . 'styles' => array(
|
$this->table_prefix . 'styles' => array(
|
||||||
'imageset_id',
|
'imageset_id',
|
||||||
|
@ -53,6 +61,14 @@ class style_update_p2 extends \phpbb\db\migration\migration
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
||||||
|
'add_index' => array(
|
||||||
|
$this->table_prefix . 'styles' => array(
|
||||||
|
'imageset_id' => array('imageset_id'),
|
||||||
|
'template_id' => array('template_id'),
|
||||||
|
'theme_id' => array('theme_id'),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
|
||||||
'add_tables' => array(
|
'add_tables' => array(
|
||||||
$this->table_prefix . 'styles_imageset' => array(
|
$this->table_prefix . 'styles_imageset' => array(
|
||||||
'COLUMNS' => array(
|
'COLUMNS' => array(
|
||||||
|
|
Loading…
Add table
Reference in a new issue