diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-25 12:50:32 -0800 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2013-02-25 12:50:32 -0800 |
commit | 6dd1d479dabbe69be971525034b2711497e34098 (patch) | |
tree | 3c99c2ba3192161eff1497558bef6a342a419369 /tests/lib | |
parent | a533bb6dcd4a68927c21b63a83830d79384320a5 (diff) | |
parent | 9898ba4daf1acdead2ed5fa6024e779caafb353e (diff) | |
download | nextcloud-server-6dd1d479dabbe69be971525034b2711497e34098.tar.gz nextcloud-server-6dd1d479dabbe69be971525034b2711497e34098.zip |
Merge pull request #1706 from owncloud/master-sqlserver
Microsoft SQL-Server support for ownCloud!
Diffstat (limited to 'tests/lib')
-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(); |