aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dbal/migration/revert.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/dbal/migration/revert.php')
-rw-r--r--tests/dbal/migration/revert.php40
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/dbal/migration/revert.php b/tests/dbal/migration/revert.php
new file mode 100644
index 0000000000..ac01987cd4
--- /dev/null
+++ b/tests/dbal/migration/revert.php
@@ -0,0 +1,40 @@
+<?php
+/**
+*
+* @package testing
+* @copyright (c) 2011 phpBB Group
+* @license http://opensource.org/licenses/gpl-license.php GNU Public License
+*
+*/
+
+class phpbb_dbal_migration_revert extends phpbb_db_migration
+{
+ function update_schema()
+ {
+ return array(
+ 'add_columns' => array(
+ 'phpbb_config' => array(
+ 'bar_column' => array('UINT', 1),
+ ),
+ ),
+ );
+ }
+
+ function revert_schema()
+ {
+ return array(
+ 'drop_columns' => array(
+ 'phpbb_config' => array(
+ 'bar_column',
+ ),
+ ),
+ );
+ }
+
+ function update_data()
+ {
+ return array(
+ array('config.add', array('foobartest', 0)),
+ );
+ }
+}