diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php index 9f68ce6a5b93..2342cec2abc6 100755 --- a/src/Illuminate/Database/Schema/Blueprint.php +++ b/src/Illuminate/Database/Schema/Blueprint.php @@ -783,17 +783,6 @@ public function dateTime($column, $precision = 0) return $this->addColumn('dateTime', $column, compact('precision')); } - /** - * Create a new year column on the table. - * - * @param string $column - * @return \Illuminate\Support\Fluent - */ - public function year($column) - { - return $this->addColumn('year', $column); - } - /** * Create a new date-time column (with time zone) on the table. * @@ -916,6 +905,17 @@ public function softDeletesTz($precision = 0) return $this->timestampTz('deleted_at', $precision)->nullable(); } + /** + * Create a new year column on the table. + * + * @param string $column + * @return \Illuminate\Support\Fluent + */ + public function year($column) + { + return $this->addColumn('year', $column); + } + /** * Create a new binary column on the table. * diff --git a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php index 2ebfbf9d9315..149f300a2c34 100755 --- a/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/MySqlGrammar.php @@ -585,17 +585,6 @@ protected function typeDate(Fluent $column) return 'date'; } - /** - * Create the column definition for a year type. - * - * @param \Illuminate\Support\Fluent $column - * @return string - */ - protected function typeYear(Fluent $column) - { - return 'year'; - } - /** * Create the column definition for a date-time type. * @@ -664,6 +653,17 @@ protected function typeTimestampTz(Fluent $column) return $this->typeTimestamp($column); } + /** + * Create the column definition for a year type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeYear(Fluent $column) + { + return 'year'; + } + /** * Create the column definition for a binary type. * diff --git a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php index de220138b566..5eed79cdc480 100755 --- a/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/PostgresGrammar.php @@ -536,17 +536,6 @@ protected function typeDate(Fluent $column) return 'date'; } - /** - * Create the column definition for a year type (Polyfill). - * - * @param \Illuminate\Support\Fluent $column - * @return string - */ - protected function typeYear(Fluent $column) - { - return $this->typeInteger($column); - } - /** * Create the column definition for a date-time type. * @@ -617,6 +606,17 @@ protected function typeTimestampTz(Fluent $column) return $column->useCurrent ? "$columnType default CURRENT_TIMESTAMP" : $columnType; } + /** + * Create the column definition for a year type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeYear(Fluent $column) + { + return $this->typeInteger($column); + } + /** * Create the column definition for a binary type. * diff --git a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php b/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php index cb6d57e24e06..099a719ca050 100755 --- a/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/SQLiteGrammar.php @@ -545,17 +545,6 @@ protected function typeDate(Fluent $column) return 'date'; } - /** - * Create the column definition for a year type (Polyfill). - * - * @param \Illuminate\Support\Fluent $column - * @return string - */ - protected function typeYear(Fluent $column) - { - return $this->typeInteger($column); - } - /** * Create the column definition for a date-time type. * @@ -625,6 +614,17 @@ protected function typeTimestampTz(Fluent $column) return $this->typeTimestamp($column); } + /** + * Create the column definition for a year type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeYear(Fluent $column) + { + return $this->typeInteger($column); + } + /** * Create the column definition for a binary type. * diff --git a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php b/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php index 1b8d88f731c0..40a21c1d5603 100755 --- a/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php +++ b/src/Illuminate/Database/Schema/Grammars/SqlServerGrammar.php @@ -495,17 +495,6 @@ protected function typeDate(Fluent $column) return 'date'; } - /** - * Create the column definition for a year type (Polyfill). - * - * @param \Illuminate\Support\Fluent $column - * @return string - */ - protected function typeYear(Fluent $column) - { - return $this->typeInteger($column); - } - /** * Create the column definition for a date-time type. * @@ -582,6 +571,17 @@ protected function typeTimestampTz(Fluent $column) return "datetimeoffset($column->precision)"; } + /** + * Create the column definition for a year type. + * + * @param \Illuminate\Support\Fluent $column + * @return string + */ + protected function typeYear(Fluent $column) + { + return $this->typeInteger($column); + } + /** * Create the column definition for a binary type. *