Unsigned only supported by MySQL.
Signed-off-by: Taylor Otwell <taylorotwell@gmail.com>
This commit is contained in:
parent
f3df013753
commit
46595ce55e
|
@ -47,21 +47,6 @@ protected function drop_constraint(Table $table, Fluent $command)
|
|||
return "ALTER TABLE ".$this->wrap($table)." DROP CONSTRAINT ".$command->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SQL syntax for indicating if a column is unsigned.
|
||||
*
|
||||
* @param Table $table
|
||||
* @param Fluent $column
|
||||
* @return string
|
||||
*/
|
||||
protected function unsigned(Table $table, Fluent $column)
|
||||
{
|
||||
if ($column->type == 'integer' && $column->unsigned)
|
||||
{
|
||||
return ' UNSIGNED';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Wrap a value in keyword identifiers.
|
||||
*
|
||||
|
|
|
@ -90,6 +90,21 @@ protected function columns(Table $table)
|
|||
return $columns;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SQL syntax for indicating if a column is unsigned.
|
||||
*
|
||||
* @param Table $table
|
||||
* @param Fluent $column
|
||||
* @return string
|
||||
*/
|
||||
protected function unsigned(Table $table, Fluent $column)
|
||||
{
|
||||
if ($column->type == 'integer' && $column->unsigned)
|
||||
{
|
||||
return ' UNSIGNED';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the SQL syntax for indicating if a column is nullable.
|
||||
*
|
||||
|
|
|
@ -65,7 +65,7 @@ protected function columns(Table $table)
|
|||
// types to the types used by the database.
|
||||
$sql = $this->wrap($column).' '.$this->type($column);
|
||||
|
||||
$elements = array('unsigned', 'incrementer', 'nullable', 'defaults');
|
||||
$elements = array('incrementer', 'nullable', 'defaults');
|
||||
|
||||
foreach ($elements as $element)
|
||||
{
|
||||
|
|
|
@ -91,7 +91,7 @@ protected function columns(Table $table)
|
|||
// types to the types used by the database.
|
||||
$sql = $this->wrap($column).' '.$this->type($column);
|
||||
|
||||
$elements = array('unsigned', 'nullable', 'defaults', 'incrementer');
|
||||
$elements = array('nullable', 'defaults', 'incrementer');
|
||||
|
||||
foreach ($elements as $element)
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ protected function columns(Table $table)
|
|||
// types to the types used by the database.
|
||||
$sql = $this->wrap($column).' '.$this->type($column);
|
||||
|
||||
$elements = array('unsigned', 'incrementer', 'nullable', 'defaults');
|
||||
$elements = array('incrementer', 'nullable', 'defaults');
|
||||
|
||||
foreach ($elements as $element)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue