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

This commit is contained in:
Maxime Rault 2016-02-05 09:13:08 +01:00
parent ed2787c21c
commit 79c3cf22d0

View File

@ -22,7 +22,7 @@ class DB2Grammar extends Grammar {
* *
* @var array * @var array
*/ */
protected $serials = ['bigInteger', 'integer', 'smallInteger']; protected $serials = ['smallInteger', 'integer', 'bigInteger'];
/** /**
* Wrap a single string in keyword identifiers. * Wrap a single string in keyword identifiers.
@ -682,7 +682,7 @@ class DB2Grammar extends Grammar {
{ {
if (in_array($column->type, $this->serials) && $column->autoIncrement) if (in_array($column->type, $this->serials) && $column->autoIncrement)
{ {
return ' as identity'; return ' as identity constraint ' . $blueprint->getTable() . '_' . $column->name . '_primary primary key';
} }
} }