Commit b7d068f2 authored by Colin Viebrock's avatar Colin Viebrock

Move method into grammar.php instead of duplicating in each grammar

parent 26c72734
......@@ -39,4 +39,19 @@ abstract class Grammar extends \Laravel\Database\Grammar {
return parent::wrap($value);
}
/**
* 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';
}
}
}
\ No newline at end of file
......@@ -90,21 +90,6 @@ class MySQL extends Grammar {
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.
*
......
......@@ -78,21 +78,6 @@ class Postgres extends Grammar {
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.
*
......
......@@ -104,21 +104,6 @@ class SQLite extends Grammar {
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.
*
......
......@@ -85,21 +85,6 @@ class SQLServer extends Grammar {
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.
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment