diff options
author | Andreas Fischer <bantu@owncloud.com> | 2014-04-14 18:29:47 +0200 |
---|---|---|
committer | Andreas Fischer <bantu@owncloud.com> | 2014-04-14 18:37:47 +0200 |
commit | b0e6542dc2a72289a396d2e29604e4e83a6136a2 (patch) | |
tree | 559a28f7d1abe1ea5b92af27f773baffacfb0f15 /core/command | |
parent | e3b0b40779369457e849396f2dfee3a3d652114f (diff) | |
download | nextcloud-server-b0e6542dc2a72289a396d2e29604e4e83a6136a2.tar.gz nextcloud-server-b0e6542dc2a72289a396d2e29604e4e83a6136a2.zip |
Add error handling for --clear-schema on Oracle.
Diffstat (limited to 'core/command')
-rw-r--r-- | core/command/db/converttype.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php index 6ab2d893c60..64178d1ef7f 100644 --- a/core/command/db/converttype.php +++ b/core/command/db/converttype.php @@ -120,6 +120,17 @@ class ConvertType extends Command { $toDB = $this->getToDBConnection($input, $output); if ($input->getOption('clear-schema')) { + if ($input->getArgument('type') === 'oci') { + // Doctrine unconditionally tries (at least in version 2.3) + // to drop sequence triggers when dropping a table, even though + // such triggers may not exist. This results in errors like + // "ORA-04080: trigger 'OC_STORAGES_AI_PK' does not exist". + $output->writeln(sprintf( + '<error>The --clear-schema option is not supported when converting to Oracle (oci).</error>', + $input->getArgument('type') + )); + return 1; + } $this->clearSchema($toDB->getSchemaManager(), $input, $output); } |