From 8b5fac7fcc1a23f42f32e9766e79aca742fe4022 Mon Sep 17 00:00:00 2001 From: angelomaragna Date: Thu, 19 Feb 2015 00:06:37 +0100 Subject: [PATCH] fix change column in Grammar.php Bug found changing a float column to decimal with a migration php artisan migrate returns 'Doctrine\DBAL\DBALException' with message 'Unknown column type "decimal(8, 2)" because $this->getType($fluent) returns decimal(8,2). $fluent['type'] should be used in order to call the proper Doctrine getType function to work --- src/Illuminate/Database/Schema/Grammars/Grammar.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Illuminate/Database/Schema/Grammars/Grammar.php b/src/Illuminate/Database/Schema/Grammars/Grammar.php index f0c7688b4d62..5c43cabdaf0d 100755 --- a/src/Illuminate/Database/Schema/Grammars/Grammar.php +++ b/src/Illuminate/Database/Schema/Grammars/Grammar.php @@ -358,7 +358,7 @@ protected function getDoctrineColumnForChange(Table $table, Fluent $fluent) */ protected function getDoctrineColumnChangeOptions(Fluent $fluent) { - $options = ['type' => Type::getType($this->getType($fluent))]; + $options = ['type' => Type::getType($fluent['type'])]; if (in_array($fluent['type'], ['text', 'mediumText', 'longText'])) {