-
Notifications
You must be signed in to change notification settings - Fork 824
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
Integer fields never match stored schema in MySQL 8 #9453
Comments
gurucomkz
added a commit
to gurucomkz/silverstripe-framework
that referenced
this issue
Oct 28, 2020
gurucomkz
added a commit
to gurucomkz/silverstripe-framework
that referenced
this issue
Oct 28, 2020
fix: don't use int width for mysql > 8.0.17 silverstripe#9453
gurucomkz
added a commit
to gurucomkz/silverstripe-framework
that referenced
this issue
Oct 28, 2020
maxime-rainville
pushed a commit
to gurucomkz/silverstripe-framework
that referenced
this issue
May 16, 2021
gurucomkz
added a commit
to gurucomkz/silverstripe-framework
that referenced
this issue
Nov 1, 2021
maxime-rainville
pushed a commit
that referenced
this issue
Dec 12, 2021
FIX Don't use int width for mysql >= 8.0.17 #9453
2 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Affected Version
4.x (potentially 3.x also, untested though)
Description
When running Silverstripe against MySQL 8, all integer fields (including IDs and 'Booleans') are ALTERed during every
dev/build
. This is caused by MySQL 8 no longer storing the specified display width attribute (the(11)
inint(11)
); they've in fact deprecated this functionality for integer fields:The display width attribute, so far as I can tell, is only useful when paired with
ZEROFILL
, which prepends0
s to values when they are stored, so this doesn't have a lot of relevance in most Silverstripe projects. Unfortunately, simply dropping the display width attributes from our default integer types inverts the issue to affect previous MySQL versions, as they always return a default display width value.Here's an excerpt of the output I see from every
dev/build
:Steps to Reproduce
dev/build
to populate the databasedev/build
again (and again, and again)Expected output: No DB changes
Observed output: Repeated integer column schema changes like the example above.
Pull requests
The text was updated successfully, but these errors were encountered: