-
Notifications
You must be signed in to change notification settings - Fork 431
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
Fix max_length issue for mysql #202
base: main
Are you sure you want to change the base?
Changes from all commits
b8095c9
d482429
1dc843b
46dac8e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,7 +41,8 @@ sitepackages = False | |
recreate = False | ||
commands = | ||
pip list | ||
py.test -xv | ||
py.test -xv --ignore=t/unit/test_models.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why are you ignoring the test you added? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The new tests are run with the line below: |
||
py.test -xv -k 'ModelMigrationTests' | ||
|
||
[testenv:upgradebeat111] | ||
basepython = python2.7 | ||
|
@@ -170,4 +171,4 @@ commands = | |
pip install -U https://github.com/celery/celery/zipball/master#egg=celery | ||
pip install -U https://github.com/celery/kombu/zipball/master#egg=kombu | ||
pip install Django==2.0 | ||
py.test -x --cov=django_celery_beat --cov-report=xml --no-cov-on-fail | ||
py.test -x --cov=django_celery_beat --cov-report=xml --no-cov-on-fail --ignore=t/unit/test_models.py | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You shouldn't need to exclude things like this. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoa... you can't base migrations off of a settings option that people can change, that makes things completely unpredictable. Just choose a more correct value, one that won't ever have the issue again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you elaborate on your surprise?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@liquidpele can't really choose "a more correct value" in this case since some values work for some databases and the same values cause errors in other databases.
As @tuky points out driving the max_length value from the settings is not a new pattern and its pretty well-established.
If there is another approach you have in mind, please share.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMHO this is allowed in some case... but we need to handle this with care. let us not rush on merging this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not that some values work and some don't, it's simply a limitation in mysql, one that is already fixed in newer versions where they increased the prefix limit for innodb tables.
One question I have, and @auvipy may know this... is the task_id ever NOT a uuid? I thought it was always a uuid, but a length of 255 there makes me think it could be other things too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do somehow agree with you. Need some analysis to answer your question properly