Skip to content
Snippets Groups Projects
Commit 67413bf8 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Correction inversion connexion source et destination !

parent dfae5296
No related branches found
No related tags found
No related merge requests found
Pipeline #4753 passed
...@@ -71,7 +71,8 @@ class SchemaService ...@@ -71,7 +71,8 @@ class SchemaService
// config DBMS Metadata // config DBMS Metadata
try { try {
$stmt = $srcConn->executeQuery($this->generateSQLForDBMSMetadataPackageConfiguration()); $sql = $this->generateSQLForDBMSMetadataPackageConfiguration();
$stmt = $srcConn->executeQuery($sql);
$stmt->execute(); $stmt->execute();
} catch (DBALException $e) { } catch (DBALException $e) {
throw new RuntimeException("Erreur!", null, $e); throw new RuntimeException("Erreur!", null, $e);
...@@ -79,7 +80,8 @@ class SchemaService ...@@ -79,7 +80,8 @@ class SchemaService
// génération DDL // génération DDL
try { try {
$stmt = $srcConn->prepare($this->generateSQLForSchemaCreation($dstConn, $refConstraintsIncluded)); $sql = $this->generateSQLForSchemaCreation($srcConn, $refConstraintsIncluded);
$stmt = $srcConn->prepare($sql);
$stmt->execute(); $stmt->execute();
} catch (DBALException $e) { } catch (DBALException $e) {
throw new RuntimeException("Erreur!", null, $e); throw new RuntimeException("Erreur!", null, $e);
...@@ -112,7 +114,8 @@ class SchemaService ...@@ -112,7 +114,8 @@ class SchemaService
// config DBMS Metadata // config DBMS Metadata
try { try {
$stmt = $srcConn->executeQuery($this->generateSQLForDBMSMetadataPackageConfiguration()); $sql = $this->generateSQLForDBMSMetadataPackageConfiguration();
$stmt = $srcConn->executeQuery($sql);
$stmt->execute(); $stmt->execute();
} catch (DBALException $e) { } catch (DBALException $e) {
throw new RuntimeException("Erreur!", null, $e); throw new RuntimeException("Erreur!", null, $e);
...@@ -120,7 +123,8 @@ class SchemaService ...@@ -120,7 +123,8 @@ class SchemaService
// génération des contraintes de référence // génération des contraintes de référence
try { try {
$stmt = $srcConn->prepare($this->generateSQLForRefConstraintsCreation($dstConn)); $sql = $this->generateSQLForRefConstraintsCreation($srcConn);
$stmt = $srcConn->prepare($sql);
$stmt->execute(); $stmt->execute();
} catch (DBALException $e) { } catch (DBALException $e) {
throw new RuntimeException("Erreur!", null, $e); throw new RuntimeException("Erreur!", null, $e);
...@@ -296,7 +300,7 @@ EOS; ...@@ -296,7 +300,7 @@ EOS;
* @param bool $refConstraintsIncluded * @param bool $refConstraintsIncluded
* @return string * @return string
*/ */
function generateSQLForSchemaCreation(Connection $connection, $refConstraintsIncluded = true) function ~~generateSQLForSchemaCreation(Connection $connection, $refConstraintsIncluded = true)
{ {
$schemaName = $this->extractSchemaNameFromConnection($connection); $schemaName = $this->extractSchemaNameFromConnection($connection);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment