mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 00:32:29 -04:00
Fix tableExists test function for Oracle
This commit is contained in:
parent
9fa4b78ba4
commit
23da0c7d18
1 changed files with 4 additions and 3 deletions
|
|
@ -102,9 +102,10 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase {
|
|||
$exists = $result && $result->fetchOne();
|
||||
break;
|
||||
case 'oci':
|
||||
$sql = 'SELECT table_name FROM user_tables WHERE table_name = ?';
|
||||
$result = \OC_DB::executeAudited($sql, array($table));
|
||||
$exists = (bool)$result->fetchOne(); //oracle uses MDB2 and returns null
|
||||
$sql = "SELECT table_name FROM user_tables WHERE table_name = '{$table}'";
|
||||
$query = OC_DB::prepare($sql);
|
||||
$result = $query->execute(array());
|
||||
$exists = $result && $result->fetchOne();
|
||||
break;
|
||||
case 'mssql':
|
||||
$sql = "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME = '{$table}'";
|
||||
|
|
|
|||
Loading…
Reference in a new issue