diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-02-10 14:23:09 +0100 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-02-10 14:23:09 +0100 |
commit | b088bf864bf5827c1801c53c0af1b5a2f89f5b16 (patch) | |
tree | 5ab11074bae8b5958c6b9195ed570f9d8448d295 /tests/dbal | |
parent | 840ab75520726e4db689ab1a92de6c17d86b107b (diff) | |
parent | 9b1b6bd47747bf077f6bd5dce69f366391f380c6 (diff) | |
download | forums-b088bf864bf5827c1801c53c0af1b5a2f89f5b16.tar forums-b088bf864bf5827c1801c53c0af1b5a2f89f5b16.tar.gz forums-b088bf864bf5827c1801c53c0af1b5a2f89f5b16.tar.bz2 forums-b088bf864bf5827c1801c53c0af1b5a2f89f5b16.tar.xz forums-b088bf864bf5827c1801c53c0af1b5a2f89f5b16.zip |
Merge remote-tracking branch 'Marc/ticket/12170' into develop
* Marc/ticket/12170:
[ticket/12170] Test for 12170
[ticket/12170] Assign schema keys in migration helper with data_depth 1
Diffstat (limited to 'tests/dbal')
-rw-r--r-- | tests/dbal/migration/schema.php | 11 | ||||
-rw-r--r-- | tests/dbal/migrator_test.php | 2 |
2 files changed, 13 insertions, 0 deletions
diff --git a/tests/dbal/migration/schema.php b/tests/dbal/migration/schema.php index 46cf66eaec..98407eb1bd 100644 --- a/tests/dbal/migration/schema.php +++ b/tests/dbal/migration/schema.php @@ -17,6 +17,14 @@ class phpbb_dbal_migration_schema extends \phpbb\db\migration\migration 'test_column1' => array('BOOL', 1), ), ), + 'add_tables' => array( + $this->table_prefix . 'foobar' => array( + 'COLUMNS' => array( + 'module_id' => array('UINT:3', NULL, 'auto_increment'), + ), + 'PRIMARY_KEY' => 'module_id', + ), + ), ); } @@ -28,6 +36,9 @@ class phpbb_dbal_migration_schema extends \phpbb\db\migration\migration 'test_column1', ), ), + 'drop_tables' => array( + $this->table_prefix . 'foobar', + ), ); } } diff --git a/tests/dbal/migrator_test.php b/tests/dbal/migrator_test.php index c075f19825..f22f5f5b30 100644 --- a/tests/dbal/migrator_test.php +++ b/tests/dbal/migrator_test.php @@ -280,6 +280,7 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case } $this->assertTrue($this->db_tools->sql_column_exists('phpbb_config', 'test_column1')); + $this->assertTrue($this->db_tools->sql_table_exists('phpbb_foobar')); while ($this->migrator->migration_state('phpbb_dbal_migration_schema')) { @@ -287,5 +288,6 @@ class phpbb_dbal_migrator_test extends phpbb_database_test_case } $this->assertFalse($this->db_tools->sql_column_exists('phpbb_config', 'test_column1')); + $this->assertFalse($this->db_tools->sql_table_exists('phpbb_foobar')); } } |