summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlsces <lester@lsces.co.uk>2026-02-04 19:55:50 +0000
committerlsces <lester@lsces.co.uk>2026-02-04 19:55:50 +0000
commit8037d4efb1097c51dd68c1266ca828e494f8f311 (patch)
tree6915fc8d7a0d9d05da5f3d4edaaf4dafd6229b08 /src
parentec10a53d7b9d0ac85dd0b41122846e022b8eb813 (diff)
downloadilluminate-firebird-8037d4efb1097c51dd68c1266ca828e494f8f311.tar.gz
illuminate-firebird-8037d4efb1097c51dd68c1266ca828e494f8f311.tar.bz2
illuminate-firebird-8037d4efb1097c51dd68c1266ca828e494f8f311.zip
Not as good as ADOdb, but functional in adding auto-increment column to table
Diffstat (limited to 'src')
-rwxr-xr-xsrc/Schema/Grammars/FirebirdGrammar.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/Schema/Grammars/FirebirdGrammar.php b/src/Schema/Grammars/FirebirdGrammar.php
index 17037fb..221a5f7 100755
--- a/src/Schema/Grammars/FirebirdGrammar.php
+++ b/src/Schema/Grammars/FirebirdGrammar.php
@@ -312,6 +312,22 @@ class FirebirdGrammar extends Grammar
}
/**
+ * Get the SQL for an auto-increment column modifier.
+ *
+ * @param \Illuminate\Database\Schema\Blueprint $blueprint
+ * @param \Illuminate\Support\Fluent $column
+ * @return string|null
+ */
+ protected function modifyIncrement(Blueprint $blueprint, Fluent $column)
+ {
+ if (in_array($column->type, $this->serials) && $column->autoIncrement) {
+ return $this->hasCommand($blueprint, 'primary') || ($column->change && ! $column->primary)
+ ? ' unique'
+ : ' generated BY DEFAULT as identity primary key';
+ }
+ }
+
+ /**
* Create the column definition for a char type.
*
* @param \Illuminate\Support\Fluent $column