Commit 62316f79 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction mauvais test du type TIMESTAMP.

parent 07256f80
Loading
Loading
Loading
Loading
+1 −1
Changes for src/UnicaenDbImport/CodeGenerator/Common/Helper/TableValidationHelper.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ abstract class TableValidationHelper extends AbstractHelper
            return null;
        }

        $timestamp = strtolower($this->getPlatform()->getDateTimeTzTypeDeclarationSQL([]));
        $timestamp = $this->getPlatform()->getDateTimeTzTypeDeclarationSQL([]);
        $now = $this->getPlatform()->getNowExpression();

        $message = "Assurez-vous que les colonnes d'historique suivantes sont présentes dans la table '$tableName' : " . PHP_EOL;
+4 −4
Changes for src/UnicaenDbImport/CodeGenerator/PostgreSQL/Helper/TableValidationHelper.php: 4 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -58,12 +58,12 @@ EOT;
     */
    public function generateSQLForHistoColumnsValidation($tableName)
    {
        $timestamp = 'timestamp with time zone';
        $udtName = 'timestamptz';

        $columnsAndTypes = [
            'created_on' => $timestamp,
            'updated_on' => $timestamp,
            'deleted_on' => $timestamp,
            'created_on' => $udtName,
            'updated_on' => $udtName,
            'deleted_on' => $udtName,
        ];

        return $this->generateSQLForColumnsValidation($tableName, $columnsAndTypes);