diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-14 21:59:24 +0100 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2013-02-14 21:59:24 +0100 |
commit | 78a3625ddfc67e7e6743a2ff6fd31e1566b174c8 (patch) | |
tree | 620da3a4d8f9e0560f41f8f43f82183f65ccba29 /tests | |
parent | bcbf2e667badaae382911f9304d0811b17167af6 (diff) | |
download | nextcloud-server-78a3625ddfc67e7e6743a2ff6fd31e1566b174c8.tar.gz nextcloud-server-78a3625ddfc67e7e6743a2ff6fd31e1566b174c8.zip |
final adoptions for mssql connectivity
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/dbschema.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/lib/dbschema.php b/tests/lib/dbschema.php index fb60ce7dbb7..e20a04ef7fd 100644 --- a/tests/lib/dbschema.php +++ b/tests/lib/dbschema.php @@ -91,9 +91,15 @@ class Test_DBSchema extends PHPUnit_Framework_TestCase { break; case 'pgsql': $sql = "SELECT tablename AS table_name, schemaname AS schema_name " - . "FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' " - . "AND schemaname != 'information_schema' " - . "AND tablename = '".$table."'"; + . "FROM pg_tables WHERE schemaname NOT LIKE 'pg_%' " + . "AND schemaname != 'information_schema' " + . "AND tablename = '".$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}'"; $query = OC_DB::prepare($sql); $result = $query->execute(array()); $exists = $result && $result->fetchOne(); |