Skip to content

Commit

Permalink
Mise à jour pour rendre les méthodes increments comme par défaut à sa…
Browse files Browse the repository at this point in the history
…voir que cela crée une clé primaire par la même occasion
  • Loading branch information
Maxime Rault committed Feb 5, 2016
1 parent ed2787c commit 79c3cf2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Schema/Grammars/DB2Grammar.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class DB2Grammar extends Grammar {
*
* @var array
*/
protected $serials = ['bigInteger', 'integer', 'smallInteger'];
protected $serials = ['smallInteger', 'integer', 'bigInteger'];

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

Expand Down

0 comments on commit 79c3cf2

Please sign in to comment.