@@ 158-166 (lines=9) @@ | ||
155 | $comparator = new \Doctrine\DBAL\Schema\Comparator(); |
|
156 | $tableDiff = $comparator->diffTable($dbTable, $table); |
|
157 | ||
158 | if ($tableDiff !== false) { |
|
159 | $diff = new SchemaDiff(); |
|
160 | $diff->fromSchema = $dbSchema; |
|
161 | $diff->changedTables[$tableName] = $tableDiff; |
|
162 | $statements = $diff->toSaveSql($this->connection->getDatabasePlatform()); |
|
163 | foreach ($statements as $sql) { |
|
164 | $this->connection->exec($sql); |
|
165 | } |
|
166 | } |
|
167 | } else { |
|
168 | $diff = new SchemaDiff(); |
|
169 | $diff->fromSchema = $dbSchema; |
|
@@ 167-175 (lines=9) @@ | ||
164 | $this->connection->exec($sql); |
|
165 | } |
|
166 | } |
|
167 | } else { |
|
168 | $diff = new SchemaDiff(); |
|
169 | $diff->fromSchema = $dbSchema; |
|
170 | $diff->newTables[$tableName] = $table; |
|
171 | $statements = $diff->toSaveSql($this->connection->getDatabasePlatform()); |
|
172 | foreach ($statements as $sql) { |
|
173 | $this->connection->exec($sql); |
|
174 | } |
|
175 | } |
|
176 | ||
177 | } |
|
178 |