diff options
Diffstat (limited to 'lib/private/DB/MDB2SchemaManager.php')
-rw-r--r-- | lib/private/DB/MDB2SchemaManager.php | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/lib/private/DB/MDB2SchemaManager.php b/lib/private/DB/MDB2SchemaManager.php index 44ea3986214..18549eb1fa2 100644 --- a/lib/private/DB/MDB2SchemaManager.php +++ b/lib/private/DB/MDB2SchemaManager.php @@ -31,36 +31,24 @@ namespace OC\DB; -use Doctrine\DBAL\Platforms\MySqlPlatform; +use Doctrine\DBAL\Platforms\MySQLPlatform; use Doctrine\DBAL\Platforms\OraclePlatform; -use Doctrine\DBAL\Platforms\PostgreSqlPlatform; +use Doctrine\DBAL\Platforms\PostgreSQL94Platform; use Doctrine\DBAL\Platforms\SqlitePlatform; use Doctrine\DBAL\Schema\Schema; -use OCP\IDBConnection; class MDB2SchemaManager { - /** @var \OC\DB\Connection $conn */ + /** @var Connection $conn */ protected $conn; /** - * @param IDBConnection $conn + * @param Connection $conn */ public function __construct($conn) { $this->conn = $conn; } /** - * saves database scheme to xml file - * @param string $file name of file - * @return bool - * - * TODO: write more documentation - */ - public function getDbStructure($file) { - return \OC\DB\MDB2SchemaWriter::saveSchemaToFile($file, $this->conn); - } - - /** * Creates tables from XML file * @param string $file file to read structure from * @return bool @@ -86,9 +74,9 @@ class MDB2SchemaManager { return new SQLiteMigrator($this->conn, $random, $config, $dispatcher); } elseif ($platform instanceof OraclePlatform) { return new OracleMigrator($this->conn, $random, $config, $dispatcher); - } elseif ($platform instanceof MySqlPlatform) { + } elseif ($platform instanceof MySQLPlatform) { return new MySQLMigrator($this->conn, $random, $config, $dispatcher); - } elseif ($platform instanceof PostgreSqlPlatform) { + } elseif ($platform instanceof PostgreSQL94Platform) { return new PostgreSqlMigrator($this->conn, $random, $config, $dispatcher); } else { return new Migrator($this->conn, $random, $config, $dispatcher); |