summaryrefslogtreecommitdiffstats
path: root/core/command/db
diff options
context:
space:
mode:
Diffstat (limited to 'core/command/db')
-rw-r--r--core/command/db/converttype.php14
1 files changed, 9 insertions, 5 deletions
diff --git a/core/command/db/converttype.php b/core/command/db/converttype.php
index cf0f4437f73..6ab2d893c60 100644
--- a/core/command/db/converttype.php
+++ b/core/command/db/converttype.php
@@ -193,7 +193,7 @@ class ConvertType extends Command {
return $schemaManager->listTableNames();
}
- protected function copyTable(Connection $fromDB, Connection $toDB, $table, OutputInterface $output) {
+ protected function copyTable(Connection $fromDB, Connection $toDB, $table, InputInterface $input, OutputInterface $output) {
/** @var $progress \Symfony\Component\Console\Helper\ProgressHelper */
$progress = $this->getHelperSet()->get('progress');
$query = 'SELECT COUNT(*) FROM '.$table;
@@ -204,9 +204,13 @@ class ConvertType extends Command {
$progress->setRedrawFrequency($count > 100 ? 5 : 1);
while($row = $statement->fetch()) {
$progress->advance();
- $data = array();
- foreach ($row as $columnName => $value) {
- $data[$toDB->quoteIdentifier($columnName)] = $value;
+ if ($input->getArgument('type') === 'oci') {
+ $data = $row;
+ } else {
+ $data = array();
+ foreach ($row as $columnName => $value) {
+ $data[$toDB->quoteIdentifier($columnName)] = $value;
+ }
}
$toDB->insert($table, $data);
}
@@ -220,7 +224,7 @@ class ConvertType extends Command {
// copy table rows
foreach($tables as $table) {
$output->writeln($table);
- $this->copyTable($fromDB, $toDB, $table, $output);
+ $this->copyTable($fromDB, $toDB, $table, $input, $output);
}
if ($type == 'pgsql') {
$sequences = $toDB->getSchemaManager()->listSequences();