statamic / eloquent-driver

Provides support for storing your Statamic data in a database, rather than flat files.
https://statamic.dev/tips/storing-content-in-a-database
MIT License
104 stars 71 forks source link

Use double instead of float for MySQL compatability #305

Closed ryanmitchell closed 2 weeks ago

ryanmitchell commented 2 weeks ago

Change the form id migration to use double as float isn't consistent in MySQL

clementmas commented 1 week ago

FYI, Laravel's double() function doesn't accept a precision parameter:

/**
 * Create a new double column on the table.
 *
 * @param  string  $column
 * @return \Illuminate\Database\Schema\ColumnDefinition
 */
public function double($column)
{
    return $this->addColumn('double', $column);
}

So it will use the default MySQL DOUBLE precision which is around 15 digits, which should still work I think.

ryanmitchell commented 1 week ago

My mistake, it was meant to be decimal not double