diff options
| author | lsces <lester@lsces.co.uk> | 2026-02-22 11:02:14 +0000 |
|---|---|---|
| committer | lsces <lester@lsces.co.uk> | 2026-02-22 11:02:14 +0000 |
| commit | ec61412bbdb5aa854638422d1e6a715276e68add (patch) | |
| tree | 8483f0cbe5512d7dcd5846cb2e90ac12796f86ae | |
| parent | 7562227db4b80fb4246f0a460a5cc3cb86f22f71 (diff) | |
| download | illuminate-firebird-ec61412bbdb5aa854638422d1e6a715276e68add.tar.gz illuminate-firebird-ec61412bbdb5aa854638422d1e6a715276e68add.tar.bz2 illuminate-firebird-ec61412bbdb5aa854638422d1e6a715276e68add.zip | |
Add default to emum field in correct sequence
| -rwxr-xr-x | src/Schema/Grammars/FirebirdGrammar.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Schema/Grammars/FirebirdGrammar.php b/src/Schema/Grammars/FirebirdGrammar.php index a684fb1..ebeefb0 100755 --- a/src/Schema/Grammars/FirebirdGrammar.php +++ b/src/Schema/Grammars/FirebirdGrammar.php @@ -492,8 +492,13 @@ class FirebirdGrammar extends Grammar $allowed = array_map(function ($a) { return "'".$a."'"; }, $column->allowed); + $default = ''; + if (! is_null($column->default)) { + $default .= ' DEFAULT '.$this->getDefaultValue($column->default); + $column->default = null; + } - return "VARCHAR(255) CHECK (\"{$column->name}\" IN (".implode(', ', $allowed).'))'; + return "VARCHAR(255) $default CHECK (\"{$column->name}\" IN (".implode(', ', $allowed).'))'; } /** |
