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

Generate new stores with MySQL timestamp precision 6 #2598

Merged

Conversation

jhawthorn
Copy link
Contributor

Under MySQL, we end up with caching issues due to timestamps by default only having 1 second precision. In recent versions of MySQL this can be increased to microsecond precision by specifying precision.

There's another PR open, #2479, which will ALTER TABLE all existing tables to increase the precision. We haven't merged partly out of worry about how long the migration will take for existing users with large tables.

This PR instead creates the table with the correct precision to begin with. This won't fix the issue for existing users, but it will for new users (and our spec suite). For existing MySQL users we can recommend they copy in and apply the migration from #2479 at their own time.

@jhawthorn jhawthorn changed the title Generate new stores MySQL timestamp precision 6 Generate new stores with MySQL timestamp precision 6 Feb 23, 2018
Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Will check if this fixes the build issues I still have with #2597

Copy link
Member

@tvdeyen tvdeyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good approach. And for existing stores we could add a rake task instead of a migration.

@jhawthorn jhawthorn merged commit b90ec9f into solidusio:master Feb 26, 2018
damianlegawiec added a commit to spark-solutions/spree that referenced this pull request Nov 7, 2018
damianlegawiec added a commit to spark-solutions/spree that referenced this pull request Nov 8, 2018
damianlegawiec added a commit to spark-solutions/spree that referenced this pull request Nov 8, 2018
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