mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 05:50:42 +02:00
[ticket/10247] Add a db_tools test for the removal of a primary key column.
The previous drop column test already deleted the primary key, so that one was replaced with an ordinary column. PHPBB3-10247
This commit is contained in:
@@ -241,6 +241,15 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||
}
|
||||
|
||||
public function test_column_remove()
|
||||
{
|
||||
$this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_int_size'));
|
||||
|
||||
$this->assertTrue($this->tools->sql_column_remove('prefix_table_name', 'c_int_size'));
|
||||
|
||||
$this->assertFalse($this->tools->sql_column_exists('prefix_table_name', 'c_int_size'));
|
||||
}
|
||||
|
||||
public function test_column_remove_primary()
|
||||
{
|
||||
$this->assertTrue($this->tools->sql_column_exists('prefix_table_name', 'c_id'));
|
||||
|
||||
@@ -264,5 +273,4 @@ class phpbb_dbal_db_tools_test extends phpbb_database_test_case
|
||||
|
||||
$this->tools->sql_table_drop('prefix_test_table');
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user