Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use double instead of float for MySQL compatability #305

Conversation

ryanmitchell
Copy link
Contributor

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

@ryanmitchell ryanmitchell merged commit cad4c51 into statamic:master Jun 19, 2024
11 checks passed
@ryanmitchell ryanmitchell deleted the fix/change-float-migration-to-double branch June 19, 2024 09:40
@clementmas
Copy link
Contributor

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
Copy link
Contributor Author

My mistake, it was meant to be decimal not double

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants