Commit c60add42 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction bug lorsque la table de log n'existe pas et que la clé de config n'est pas présente.

parent 1e83a6d7
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -117,12 +117,11 @@ class Destination implements DestinationInterface
        return (bool) $this->config->get('intermediate_table_auto_drop', false);
    }


    /**
     * {@inheritDoc}
     */
    public function getLogTable()
    {
        return $this->config->get('log_table');
        return $this->config->get('log_table', DestinationInterface::LOG_TABLE_DEFAULT_NAME);
    }
}
 No newline at end of file
+2 −2
Original line number Diff line number Diff line
@@ -168,7 +168,7 @@ class DatabaseService
    public function createImportLogTableIfNotExists()
    {
        $connection = $this->destination->getConnection();
        $importLogTable = $this->destination->getLogTable() ?: DestinationInterface::LOG_TABLE_DEFAULT_NAME;
        $importLogTable = $this->destination->getLogTable();

        // test if table exists
        $sql = $this->codeGenerator->generateSQLForTableExistenceCheck($importLogTable);
@@ -327,7 +327,7 @@ class DatabaseService
     */
    public function saveResultToLogTable(ResultInterface $result)
    {
        $importLogTable = $this->destination->getLogTable() ?: DestinationInterface::LOG_TABLE_DEFAULT_NAME;
        $importLogTable = $this->destination->getLogTable();

        $sql = $this->codeGenerator->generateSQLForInsertResultIntoLogTable($result, $importLogTable);