diff --git a/core/scripts/dump-database-d6.sh b/core/scripts/dump-database-d6.sh index 94f0364..e476f09 100644 --- a/core/scripts/dump-database-d6.sh +++ b/core/scripts/dump-database-d6.sh @@ -69,7 +69,7 @@ public function load() { $query = $connection->query(_db_get_query($table)); $values = ''; while(($row = $query->fetchAssoc()) !== FALSE) { - $values .= '->values(' . Variable::export($row) . ')'; + $values .= '->values(' . Variable::export($row, ' ') . ')'; } // Generate the field names. @@ -104,7 +104,7 @@ public function load() { $definition['fields'][$field_name]['scale'] = $matches[3]; } elseif ($field_type === 'time' || $field_type === 'datetime') { - // Does D8 have an appropriate datetime Sql type? + // We use varchar to replace the D6 datetime and time fields. $definition['fields'][$field_name]['type'] = 'varchar'; $definition['fields'][$field_name]['length'] = '100'; } @@ -118,14 +118,13 @@ public function load() { $definition['fields'][$field_name]['default'] = $row['Default']; } - // Set unsigned if it's set. if (isset($matches[4])) { $definition['fields'][$field_name]['unsigned'] = TRUE; } } - $fields = Variable::export(array_keys($definition['fields'])); - $definition = Variable::export($definition); + $fields = Variable::export(array_keys($definition['fields']), ' '); + $definition = Variable::export($definition, ' '); // Do our substitutions. $php = str_replace('{{TABLE}}', $table, $class_template);