-
Notifications
You must be signed in to change notification settings - Fork 11.6k
Description
MySQL, SQLite, OracleDB, and PostgreSQL are all able to store 8-byte floating point numbers, however the Laravel schema builder only supports adding float columns to the database. I've spent about an hour looking for anybody bringing this issue up, but I could not find any mention of creating a column of double precision.
If this is to be implemented, I'd like to be able to create a table like so:
Schema::create('table', function($table) {
$table->increments('id');
$table->float('float_col');
$table->double('double_col');
});It really surprises me that the DOUBLE type is not supported by Laravel. We have a database that uses floating point matlab serial datetimes and in order to get the correct precision we need to use the DOUBLE type.
Edit:
If this is to big of a change and will break compatibility with other databases somehow (although I do not believe it will), it would be nice to see MySQL use the higher precision DOUBLE whenever $table->float(...) is used.