Commit 21e5087e authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction du SQL pour la génération des contraintes de référence.

parent fb2f6dbd
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -127,6 +127,7 @@ class SchemaService
        }

        $sql = implode('', $result);
        var_dump($result, $sql);
        $sql = str_replace("\"$srcSchemaName\"", "\"$dstSchemaName\"", $sql);
        file_put_contents($outputFilePath, $sql);
    }
@@ -450,6 +451,9 @@ EOS;
        $schemaName = $this->extractSchemaNameFromConnection($connection);

        return <<<EOS
        
SELECT sql from (
    
    --
    -- reference constraints
    --
@@ -464,6 +468,8 @@ EOS;
    where owner = '$schemaName'
          and constraint_type = 'R'

)
ORDER BY ORD
EOS;

    }