1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-19 06:51:33 +02:00

Merge pull request #2474 from PayBas/ticket/12561

[ticket/12561] Add "after" check to schema_generator for columns_add

* PayBas/ticket/12561:
  [ticket/12561] Reworked tests by nickvergessen
  [ticket/12561] Added tests for "after last", "after missing" and "empty"
  [ticket/12561] Add check to see if "after" column actually exists
  [ticket/12561] Added test for "after"
  [ticket/12561] Add "after" check to schema_generator for columns_add
This commit is contained in:
Joas Schilling
2014-05-28 23:33:25 +02:00
9 changed files with 264 additions and 2 deletions

View File

@@ -0,0 +1,26 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_tables' => array(
$this->table_prefix . 'column_order_test1' => array(
'COLUMNS' => array(
'foobar1' => array('BOOL', 0),
'foobar3' => array('BOOL', 0),
),
'PRIMARY_KEY' => array('foobar1'),
),
),
);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order_0 extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'column_order_test1' => array(
'foobar2' => array('BOOL', 0, 'after' => 'foobar1'),
),
),
);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order_1 extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'column_order_test1' => array(
'foobar4' => array('BOOL', 0, 'after' => 'foobar3'),
),
),
);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order_2 extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'column_order_test1' => array(
'foobar5' => array('BOOL', 0, 'after' => 'non-existing'),
),
),
);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order_3 extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'column_order_test1' => array(
'foobar6' => array('BOOL', 0, 'after' => ''),
),
),
);
}
}

View File

@@ -0,0 +1,22 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order_4 extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'column_order_test1' => array(
'foobar7' => array('BOOL', 0),
),
),
);
}
}

View File

@@ -0,0 +1,23 @@
<?php
/**
*
* @package testing
* @copyright (c) 2014 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
class phpbb_dbal_migration_dummy_order_5 extends \phpbb\db\migration\migration
{
function update_schema()
{
return array(
'add_columns' => array(
$this->table_prefix . 'column_order_test1' => array(
'foobar8' => array('BOOL', 0, 'after' => 'foobar3'),
'foobar9' => array('BOOL', 0, 'after' => 'foobar3'),
),
),
);
}
}