Skip to content

Commit

Permalink
Fixes undefined target variable
Browse files Browse the repository at this point in the history
  • Loading branch information
papac committed May 20, 2023
1 parent f17203d commit 812f449
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Database/Migration/Shortcut/ConstraintColumn.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ public function addForeign(string $name, array $attributes = []): SQLGenerator

if ($this->adapter == "pgsql") {
$target = sprintf("\"%s_%s_foreign\"", $this->getTable(), $name);
} else {
$target = sprintf("%s_%s_foreign", $this->getTable(), $name);
}

if (isset($attributes['on'])) {
Expand Down

0 comments on commit 812f449

Please sign in to comment.