summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_DB.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/legacy/OC_DB.php')
-rw-r--r--lib/private/legacy/OC_DB.php50
1 files changed, 0 insertions, 50 deletions
diff --git a/lib/private/legacy/OC_DB.php b/lib/private/legacy/OC_DB.php
index b5b6c737046..a3919fd1f17 100644
--- a/lib/private/legacy/OC_DB.php
+++ b/lib/private/legacy/OC_DB.php
@@ -30,8 +30,6 @@
*
*/
-use OCP\ILogger;
-
/**
* This class manages the access to the database. It basically is a wrapper for
* Doctrine with some adaptions.
@@ -39,15 +37,6 @@ use OCP\ILogger;
class OC_DB {
/**
- * get MDB2 schema manager
- *
- * @return \OC\DB\MDB2SchemaManager
- */
- private static function getMDB2SchemaManager() {
- return new \OC\DB\MDB2SchemaManager(\OC::$server->get(\OC\DB\Connection::class));
- }
-
- /**
* Prepare a SQL query
* @param string $query Query string
* @param int|null $limit
@@ -160,45 +149,6 @@ class OC_DB {
}
/**
- * Creates tables from XML file
- * @param string $file file to read structure from
- * @return bool
- *
- * TODO: write more documentation
- */
- public static function createDbFromStructure($file) {
- $schemaManager = self::getMDB2SchemaManager();
- return $schemaManager->createDbFromStructure($file);
- }
-
- /**
- * update the database schema
- * @param string $file file to read structure from
- * @throws Exception
- * @return string|boolean
- * @suppress PhanDeprecatedFunction
- */
- public static function updateDbFromStructure($file) {
- $schemaManager = self::getMDB2SchemaManager();
- try {
- $result = $schemaManager->updateDbFromStructure($file);
- } catch (Exception $e) {
- \OCP\Util::writeLog('core', 'Failed to update database structure ('.$e.')', ILogger::FATAL);
- throw $e;
- }
- return $result;
- }
-
- /**
- * remove all tables defined in a database structure xml file
- * @param string $file the xml file describing the tables
- */
- public static function removeDBStructure($file) {
- $schemaManager = self::getMDB2SchemaManager();
- $schemaManager->removeDBStructure($file);
- }
-
- /**
* check if a result is an error and throws an exception, works with \Doctrine\DBAL\Exception
* @param mixed $result
* @param string $message