vstruhar / lara-collab

LaraCollab is a project management tool build with Laravel and React.
138 stars 37 forks source link

Method unsignedDecimal does not exist #32

Closed malpaso closed 1 week ago

malpaso commented 2 weeks ago

On running php artisan migrate I'm receiving the following error:

Method Illuminate\Database\Schema\Blueprint::unsignedDecimal does not exist.

at vendor\laravel\framework\src\Illuminate\Macroable\Traits\Macroable.php:115 111▕ */ 112▕ public function __call($method, $parameters) 113▕ { 114▕ if (! static::hasMacro($method)) { ➜ 115▕ throw new BadMethodCallException(sprintf( 116▕ 'Method %s::%s does not exist.', static::class, $method 117▕ )); 118▕ } 119▕

1 database\migrations\2023_11_07_192734_create_tasks_table.php:25 Illuminate\Database\Schema\Blueprint::__call("unsignedDecimal")

2 vendor\laravel\framework\src\Illuminate\Database\Schema\Builder.php:422

malpaso commented 2 weeks ago

changed it to decimal just to run the migration and it worked fine. Not sure why I needed to do that.

lmartino-ivz commented 1 week ago

database\migrations\2023_11_07_192734

change this: $table->unsignedDecimal('estimation', 6, 2)->nullable();

with this: $table->decimal('estimation', 6, 2)->unsigned()->nullable();

vstruhar commented 1 week ago

Fixed! Not sure why this happened but I'm guessing that the alias was removed and I didn't run migrations after Laravel update