Skip to content

Commit 79c3cf2

Browse files
author
Maxime Rault
committed
Mise à jour pour rendre les méthodes increments comme par défaut à savoir que cela crée une clé primaire par la même occasion
1 parent ed2787c commit 79c3cf2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Schema/Grammars/DB2Grammar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DB2Grammar extends Grammar {
2222
*
2323
* @var array
2424
*/
25-
protected $serials = ['bigInteger', 'integer', 'smallInteger'];
25+
protected $serials = ['smallInteger', 'integer', 'bigInteger'];
2626

2727
/**
2828
* Wrap a single string in keyword identifiers.
@@ -682,7 +682,7 @@ protected function modifyIncrement(Blueprint $blueprint, Fluent $column)
682682
{
683683
if (in_array($column->type, $this->serials) && $column->autoIncrement)
684684
{
685-
return ' as identity';
685+
return ' as identity constraint ' . $blueprint->getTable() . '_' . $column->name . '_primary primary key';
686686
}
687687
}
688688

0 commit comments

Comments
 (0)