Closed
Description
im trying to add a type of 'float' field to a user table using 'float()' functoin.
but i got a type of 'double' field instead of 'float' after 'php artisan migrate' command.
here is my migration file:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class UserAlter extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::table('user', function(Blueprint $table)
{
$table->float('asdf')->after('tt')->unsigned()->index();
//the 'asdf' field should be 'float' type, but it is double... so weird
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::table('user', function(Blueprint $table)
{
$table->dropColumn('asdf');
});
}
}
v4.2 is normal...
4.2 vs 5.0
protected function typeFloat(Fluent $column)
{
return "float({$column->total}, {$column->places})";
}
protected function typeFloat(Fluent $column)
{
return $this->typeDouble($column);
}
is it a bug? plz fix it...
Metadata
Metadata
Assignees
Labels
No labels