Core is converted, so this is dead code
Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
parent
242c9ee06c
commit
9307aaee49
|
@ -65,17 +65,15 @@ class GenerateFromSchemaFileCommand extends GenerateCommand {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
$reader = new MDB2SchemaReader($this->config, $this->connection->getDatabasePlatform());
|
$schemaFile = $this->appManager->getAppPath($appName) . '/appinfo/database.xml';
|
||||||
$schema = new Schema();
|
if (!file_exists($schemaFile)) {
|
||||||
if ($appName === 'core') {
|
$output->writeln('<error>App ' . $appName . ' does not have a database.xml file</error>');
|
||||||
$reader->loadSchemaFromFile(\OC::$SERVERROOT . '/db_structure.xml', $schema);
|
return 2;
|
||||||
} else {
|
|
||||||
if (!file_exists($this->appManager->getAppPath($appName) . '/appinfo/database.xml')) {
|
|
||||||
throw new \RuntimeException('App ' . $appName . ' does not have a database.xml file');
|
|
||||||
}
|
|
||||||
$reader->loadSchemaFromFile($this->appManager->getAppPath($appName) . '/appinfo/database.xml', $schema);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$reader = new MDB2SchemaReader($this->config, $this->connection->getDatabasePlatform());
|
||||||
|
$schema = new Schema();
|
||||||
|
$reader->loadSchemaFromFile($schemaFile, $schema);
|
||||||
|
|
||||||
$schemaBody = $this->schemaToMigration($schema);
|
$schemaBody = $this->schemaToMigration($schema);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue