1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-02-24 20:13:22 +01:00

[feature/migrations] Reports table schema changes in recent develop

PHPBB3-9737
This commit is contained in:
Nathan Guse 2013-01-14 12:38:14 -06:00
parent d30a9cb497
commit 747e514918
2 changed files with 43 additions and 0 deletions

View File

@ -21,6 +21,7 @@ class phpbb_db_migration_data_3_1_0_dev extends phpbb_db_migration
'phpbb_db_migration_data_extensions',
'phpbb_db_migration_data_style_update_p2',
'phpbb_db_migration_data_timezone_p2',
'phpbb_db_migration_data_reported_posts_display',
);
}

View File

@ -0,0 +1,42 @@
<?php
/**
*
* @package migration
* @copyright (c) 2012 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License v2
*
*/
class phpbb_db_migration_data_reported_posts_display extends phpbb_db_migration
{
public function effectively_installed()
{
return $this->db_tools->sql_column_exists($this->table_prefix . 'reports', 'reported_post_enable_bbcode');
}
public function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'reports' => array(
'reported_post_enable_bbcode' => array('BOOL', 1),
'reported_post_enable_smilies' => array('BOOL', 1),
'reported_post_enable_magic_url' => array('BOOL', 1),
),
),
);
}
public function revert_schema()
{
return array(
'drop_columns' => array(
$this->table_prefix . 'reports' => array(
'reported_post_enable_bbcode',
'reported_post_enable_smilies',
'reported_post_enable_magic_url',
),
),
);
}
}