| @@ 124-132 (lines=9) @@ | ||
| 121 | $comparator = new \Doctrine\DBAL\Schema\Comparator(); |
|
| 122 | $tableDiff = $comparator->diffTable($dbTable, $table); |
|
| 123 | ||
| 124 | if ($tableDiff !== false) { |
|
| 125 | $diff = new SchemaDiff(); |
|
| 126 | $diff->fromSchema = $dbSchema; |
|
| 127 | $diff->changedTables[$tableName] = $tableDiff; |
|
| 128 | $statements = $diff->toSaveSql($this->connection->getDatabasePlatform()); |
|
| 129 | foreach ($statements as $sql) { |
|
| 130 | $this->connection->exec($sql); |
|
| 131 | } |
|
| 132 | } |
|
| 133 | } else { |
|
| 134 | $diff = new SchemaDiff(); |
|
| 135 | $diff->fromSchema = $dbSchema; |
|
| @@ 133-141 (lines=9) @@ | ||
| 130 | $this->connection->exec($sql); |
|
| 131 | } |
|
| 132 | } |
|
| 133 | } else { |
|
| 134 | $diff = new SchemaDiff(); |
|
| 135 | $diff->fromSchema = $dbSchema; |
|
| 136 | $diff->newTables[$tableName] = $table; |
|
| 137 | $statements = $diff->toSaveSql($this->connection->getDatabasePlatform()); |
|
| 138 | foreach ($statements as $sql) { |
|
| 139 | $this->connection->exec($sql); |
|
| 140 | } |
|
| 141 | } |
|
| 142 | ||
| 143 | } |
|
| 144 | ||