aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dbal/migration
diff options
context:
space:
mode:
authorPayBas <contact@paybas.com>2014-05-26 20:47:19 +0200
committerPayBas <contact@paybas.com>2014-05-26 20:47:19 +0200
commit3cabe5fd792fced4120de02cfef66900b49516c4 (patch)
tree7d15e28481a9c15568a802cfd0d6e39088f35a48 /tests/dbal/migration
parentc51b926631eb8e339c7a29cf3ff145e9e158b04f (diff)
downloadforums-3cabe5fd792fced4120de02cfef66900b49516c4.tar
forums-3cabe5fd792fced4120de02cfef66900b49516c4.tar.gz
forums-3cabe5fd792fced4120de02cfef66900b49516c4.tar.bz2
forums-3cabe5fd792fced4120de02cfef66900b49516c4.tar.xz
forums-3cabe5fd792fced4120de02cfef66900b49516c4.zip
[ticket/12561] Added tests for "after last", "after missing" and "empty"
Also removed tabs PHPBB3-12561
Diffstat (limited to 'tests/dbal/migration')
-rw-r--r--tests/dbal/migration/dummy_order.php49
1 files changed, 47 insertions, 2 deletions
diff --git a/tests/dbal/migration/dummy_order.php b/tests/dbal/migration/dummy_order.php
index 011ac7c1e9..af047eb416 100644
--- a/tests/dbal/migration/dummy_order.php
+++ b/tests/dbal/migration/dummy_order.php
@@ -13,7 +13,7 @@ class phpbb_dbal_migration_dummy_order extends \phpbb\db\migration\migration
{
return array(
'add_tables' => array(
- $this->table_prefix . 'column_order_test' => array(
+ $this->table_prefix . 'column_order_test1' => array(
'COLUMNS' => array(
'foobar1' => array('BOOL', 0),
'foobar3' => array('BOOL', 0),
@@ -22,10 +22,55 @@ class phpbb_dbal_migration_dummy_order extends \phpbb\db\migration\migration
),
),
'add_columns' => array(
- $this->table_prefix . 'column_order_test' => array(
+ $this->table_prefix . 'column_order_test1' => array(
'foobar2' => array('BOOL', 0, 'after' => 'foobar1'),
),
),
+
+ 'add_tables' => array(
+ $this->table_prefix . 'column_order_test2' => array(
+ 'COLUMNS' => array(
+ 'foobar1' => array('BOOL', 0),
+ 'foobar3' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('foobar1'),
+ ),
+ ),
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test2' => array(
+ 'foobar4' => array('BOOL', 0, 'after' => 'foobar3'),
+ ),
+ ),
+
+ 'add_tables' => array(
+ $this->table_prefix . 'column_order_test3' => array(
+ 'COLUMNS' => array(
+ 'foobar1' => array('BOOL', 0),
+ 'foobar3' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('foobar1'),
+ ),
+ ),
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test3' => array(
+ 'foobar5' => array('BOOL', 0, 'after' => 'non-existing'),
+ ),
+ ),
+
+ 'add_tables' => array(
+ $this->table_prefix . 'column_order_test4' => array(
+ 'COLUMNS' => array(
+ 'foobar1' => array('BOOL', 0),
+ 'foobar3' => array('BOOL', 0),
+ ),
+ 'PRIMARY_KEY' => array('foobar1'),
+ ),
+ ),
+ 'add_columns' => array(
+ $this->table_prefix . 'column_order_test4' => array(
+ 'foobar5' => array('BOOL', 0, 'after' => ''),
+ ),
+ ),
);
}
}