summaryrefslogtreecommitdiffstats
path: root/lib/private/legacy/OC_DB.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2021-03-24 20:27:39 +0100
committerMorris Jobke <hey@morrisjobke.de>2021-03-24 22:15:44 +0100
commitab48d5e8cbb653767070a286650b87ae97461f37 (patch)
tree57888a2d7b536c94bcc309e33566ea0db840c2d7 /lib/private/legacy/OC_DB.php
parentbb0c50717cd604ffeafacafe901a70c894ed29f3 (diff)
downloadnextcloud-server-ab48d5e8cbb653767070a286650b87ae97461f37.tar.gz
nextcloud-server-ab48d5e8cbb653767070a286650b87ae97461f37.zip
Cleanup unneeded code around database.xml
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
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