summaryrefslogtreecommitdiffstats
path: root/tests/lib/DB/DBSchemaTest.php
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-06-29 14:54:41 +0200
committerGitHub <noreply@github.com>2016-06-29 14:54:41 +0200
commitb55ab6d22a82dbd5c1f6f30b23471dfb0a6a48ab (patch)
tree21451703ce0616984ebe66f22b7109ccb394b928 /tests/lib/DB/DBSchemaTest.php
parentc8fbe3980116bd94bd136c63d581c4bd6212cc3d (diff)
downloadnextcloud-server-b55ab6d22a82dbd5c1f6f30b23471dfb0a6a48ab.tar.gz
nextcloud-server-b55ab6d22a82dbd5c1f6f30b23471dfb0a6a48ab.zip
Various database migration fixes (#25209)
* String columns with a length higher then 4000 are converted into a CLOB columns automagically - we have to respect this when migrating * Adding schema migration tests to prevent unnecessary and non-sense migration steps Fix Oracle autoincrement and unsigned handling * Fix sqlite integer type for autoincrement * Use lower case table names - fixes pg * Fix postgres with default -1 - this only affect pg 9.4 servers - 9.5 seems to work fine
Diffstat (limited to 'tests/lib/DB/DBSchemaTest.php')
-rw-r--r--tests/lib/DB/DBSchemaTest.php7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/lib/DB/DBSchemaTest.php b/tests/lib/DB/DBSchemaTest.php
index 284fc532c2a..ba17546a34a 100644
--- a/tests/lib/DB/DBSchemaTest.php
+++ b/tests/lib/DB/DBSchemaTest.php
@@ -8,15 +8,17 @@
namespace Test\DB;
+use Doctrine\DBAL\Platforms\SqlitePlatform;
use OC_DB;
use OCP\Security\ISecureRandom;
+use Test\TestCase;
/**
* Class DBSchemaTest
*
* @group DB
*/
-class DBSchemaTest extends \Test\TestCase {
+class DBSchemaTest extends TestCase {
protected $schema_file = 'static://test_db_scheme';
protected $schema_file2 = 'static://test_db_scheme2';
protected $table1;
@@ -53,7 +55,6 @@ class DBSchemaTest extends \Test\TestCase {
* @medium
*/
public function testSchema() {
- $platform = \OC::$server->getDatabaseConnection()->getDatabasePlatform();
$this->doTestSchemaCreating();
$this->doTestSchemaChanging();
$this->doTestSchemaDumping();
@@ -97,7 +98,7 @@ class DBSchemaTest extends \Test\TestCase {
*/
public function assertTableNotExist($table) {
$platform = \OC::$server->getDatabaseConnection()->getDatabasePlatform();
- if ($platform instanceof \Doctrine\DBAL\Platforms\SqlitePlatform) {
+ if ($platform instanceof SqlitePlatform) {
// sqlite removes the tables after closing the DB
$this->assertTrue(true);
} else {