Browse Source

NOT NULL order issue fixed!

thanks @crynobone !!!
Tobsn 12 years ago
parent
commit
0b9b102dc7
1 changed files with 2 additions and 2 deletions
  1. 2 2
      laravel/database/schema/grammars/mysql.php

+ 2 - 2
laravel/database/schema/grammars/mysql.php

@@ -99,7 +99,7 @@ class MySQL extends Grammar {
 	 */
 	 */
 	protected function unsigned(Table $table, Fluent $column)
 	protected function unsigned(Table $table, Fluent $column)
 	{
 	{
-		if ($column->type == 'integer' && $column->unsigned)
+		if ($column->type == 'integer' && ($column->unsigned || $column->increment))
 		{
 		{
 			return ' UNSIGNED';
 			return ' UNSIGNED';
 		}
 		}
@@ -143,7 +143,7 @@ class MySQL extends Grammar {
 	{
 	{
 		if ($column->type == 'integer' and $column->increment)
 		if ($column->type == 'integer' and $column->increment)
 		{
 		{
-			return ' UNSIGNED AUTO_INCREMENT PRIMARY KEY';
+			return ' AUTO_INCREMENT PRIMARY KEY';
 		}
 		}
 	}
 	}