aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNathan Guse <nathaniel.guse@gmail.com>2013-01-14 12:38:14 -0600
committerNathan Guse <nathaniel.guse@gmail.com>2013-02-06 11:35:55 -0600
commit747e51491859507ad2f1891df5df4e563c23dd57 (patch)
tree1065db265b8ca8f2ea550a1b9a116fd0ef283afa
parentd30a9cb4971f261e33a4814cc94c8fd218afda91 (diff)
downloadforums-747e51491859507ad2f1891df5df4e563c23dd57.tar
forums-747e51491859507ad2f1891df5df4e563c23dd57.tar.gz
forums-747e51491859507ad2f1891df5df4e563c23dd57.tar.bz2
forums-747e51491859507ad2f1891df5df4e563c23dd57.tar.xz
forums-747e51491859507ad2f1891df5df4e563c23dd57.zip
[feature/migrations] Reports table schema changes in recent develop
PHPBB3-9737
-rw-r--r--phpBB/includes/db/migration/data/3_1_0_dev.php1
-rw-r--r--phpBB/includes/db/migration/data/reported_posts_display.php42
2 files changed, 43 insertions, 0 deletions
diff --git a/phpBB/includes/db/migration/data/3_1_0_dev.php b/phpBB/includes/db/migration/data/3_1_0_dev.php
index ac8882cb3a..8b437104e0 100644
--- a/phpBB/includes/db/migration/data/3_1_0_dev.php
+++ b/phpBB/includes/db/migration/data/3_1_0_dev.php
@@ -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',
);
}
diff --git a/phpBB/includes/db/migration/data/reported_posts_display.php b/phpBB/includes/db/migration/data/reported_posts_display.php
new file mode 100644
index 0000000000..fa605e28e5
--- /dev/null
+++ b/phpBB/includes/db/migration/data/reported_posts_display.php
@@ -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',
+ ),
+ ),
+ );
+ }
+}