mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-13 20:28:44 +01:00
Merge branch 'develop-olympus' into develop
* develop-olympus: [ticket/11295] Drop tables rather than database for postgres in test suite. Conflicts: tests/test_framework/phpbb_database_test_connection_manager.php
This commit is contained in:
commit
ec97e60e17
@ -186,6 +186,16 @@ class phpbb_database_test_connection_manager
|
||||
$this->purge_extras();
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$this->connect();
|
||||
// Drop all of the tables
|
||||
foreach ($this->get_tables() as $table)
|
||||
{
|
||||
$this->pdo->exec('DROP TABLE ' . $table . ' CASCADE');
|
||||
}
|
||||
$this->purge_extras();
|
||||
break;
|
||||
|
||||
default:
|
||||
$this->connect(false);
|
||||
|
||||
@ -418,6 +428,19 @@ class phpbb_database_test_connection_manager
|
||||
$queries[] = 'DROP SEQUENCE ' . current($row);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'postgres':
|
||||
$sql = 'SELECT sequence_name
|
||||
FROM information_schema.sequences';
|
||||
$result = $this->pdo->query($sql);
|
||||
|
||||
while ($row = $result->fetch(PDO::FETCH_NUM))
|
||||
{
|
||||
$queries[] = 'DROP SEQUENCE ' . current($row);
|
||||
}
|
||||
|
||||
$queries[] = 'DROP TYPE IF EXISTS varchar_ci CASCADE';
|
||||
break;
|
||||
}
|
||||
|
||||
foreach ($queries as $query)
|
||||
|
Loading…
x
Reference in New Issue
Block a user