Skip to content

Commit

Permalink
Check platform option exists before use
Browse files Browse the repository at this point in the history
  • Loading branch information
GwendolenLynch committed Mar 8, 2024
1 parent 07e9d7a commit cd67572
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Driver/PostGISPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ public function getAlterTableSQL(TableDiff $diff): array

/** @var ColumnDiff $columnDiff */
foreach ($diff->getModifiedColumns() as $columnDiff) {
if(!$columnDiff->getOldColumn()->hasPlatformOption('srid') && !$columnDiff->getNewColumn()->hasPlatformOption('srid')) {
continue;
}
if ($columnDiff->getOldColumn()->getPlatformOption('srid') !== $columnDiff->getNewColumn()->getPlatformOption('srid')) {
$sql[] = sprintf(
"SELECT UpdateGeometrySRID('%s', '%s', %d)",
Expand Down

0 comments on commit cd67572

Please sign in to comment.