Commit 67413bf8 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction inversion connexion source et destination !

parent dfae5296
Loading
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -71,7 +71,8 @@ class SchemaService

        // config DBMS Metadata
        try {
            $stmt = $srcConn->executeQuery($this->generateSQLForDBMSMetadataPackageConfiguration());
            $sql = $this->generateSQLForDBMSMetadataPackageConfiguration();
            $stmt = $srcConn->executeQuery($sql);
            $stmt->execute();
        } catch (DBALException $e) {
            throw new RuntimeException("Erreur!", null, $e);
@@ -79,7 +80,8 @@ class SchemaService

        // génération DDL
        try {
            $stmt = $srcConn->prepare($this->generateSQLForSchemaCreation($dstConn, $refConstraintsIncluded));
            $sql = $this->generateSQLForSchemaCreation($srcConn, $refConstraintsIncluded);
            $stmt = $srcConn->prepare($sql);
            $stmt->execute();
        } catch (DBALException $e) {
            throw new RuntimeException("Erreur!", null, $e);
@@ -112,7 +114,8 @@ class SchemaService

        // config DBMS Metadata
        try {
            $stmt = $srcConn->executeQuery($this->generateSQLForDBMSMetadataPackageConfiguration());
            $sql = $this->generateSQLForDBMSMetadataPackageConfiguration();
            $stmt = $srcConn->executeQuery($sql);
            $stmt->execute();
        } catch (DBALException $e) {
            throw new RuntimeException("Erreur!", null, $e);
@@ -120,7 +123,8 @@ class SchemaService

        // génération des contraintes de référence
        try {
            $stmt = $srcConn->prepare($this->generateSQLForRefConstraintsCreation($dstConn));
            $sql = $this->generateSQLForRefConstraintsCreation($srcConn);
            $stmt = $srcConn->prepare($sql);
            $stmt->execute();
        } catch (DBALException $e) {
            throw new RuntimeException("Erreur!", null, $e);
@@ -296,7 +300,7 @@ EOS;
     * @param bool       $refConstraintsIncluded
     * @return string
     */
    function generateSQLForSchemaCreation(Connection $connection, $refConstraintsIncluded = true)
    function ~~generateSQLForSchemaCreation(Connection $connection, $refConstraintsIncluded = true)
    {
        $schemaName = $this->extractSchemaNameFromConnection($connection);