server/lib/private/setup/sqlite.php
Thomas Müller 9c9dc276b7 move the private namespace OC into lib/private - OCP will stay in lib/public
Conflicts:
	lib/private/vcategories.php
2013-09-30 16:36:59 +02:00

26 lines
616 B
PHP

<?php
namespace OC\Setup;
class Sqlite extends AbstractDatabase {
public $dbprettyname = 'Sqlite';
public function validate($config) {
return array();
}
public function initialize($config) {
}
public function setupDatabase($username) {
$datadir = \OC_Config::getValue('datadirectory');
//delete the old sqlite database first, might cause infinte loops otherwise
if(file_exists("$datadir/owncloud.db")) {
unlink("$datadir/owncloud.db");
}
//in case of sqlite, we can always fill the database
error_log("creating sqlite db");
\OC_DB::createDbFromStructure($this->dbDefinitionFile);
}
}