saving {{{sqlmigrate}}} to a file and executing it will work fine, which
makes it harder to determine what the issue is - the schema migration does
not have any inserts.
I found that the issue was caused by model name length not fitting into
ContentType's 100 character limit.
I suggest any of the following
# Validate model names in ContentType model and raise a validation error
so it's more clear to the user what is causing it
# Enforce model name length limit
# Truncate model name in ContentType objects down to 100 characters
--
Ticket URL: <https://code.djangoproject.com/ticket/28313>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Old description:
New description:
* Validate model names in ContentType model and raise a validation error
so it's more clear to the user what is causing it
* Enforce model name length limit
* Truncate model name in ContentType objects down to 100 characters
--
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:1>
* version: 1.8 => 1.11
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:2>
* stage: Unreviewed => Accepted
Comment:
I guess we could add a `django.contrib.contenttypes` system check for
that.
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:3>
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:4>
* owner: nobody => Michal Dabski
* status: new => assigned
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:5>
Comment (by Michal Dabski):
Merge request:
https://github.com/django/django/pull/8647
Is a test case needed?
Can this be backported to LTS?
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:6>
* has_patch: 0 => 1
* needs_tests: 0 => 1
Comment:
Yes, tests are always required unless it's infeasible.
This does not qualify for a backport based on our
[https://docs.djangoproject.com/en/dev/internals/release-process
/#supported-versions supported versions policy]. I don't think model names
longer than 100 characters are common.
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:7>
Comment (by Michal Dabski):
I added tests and pushed to my branch, but the pull request did not update
for me... should I open a new one or is this some temporary hiccup on
github?
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:8>
Comment (by Tom):
The merge request appears to have tests, except the
``test_model_name_too_long`` test seems to fail.
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:9>
Comment (by Michal Dabski):
I noticed the mr got update do the next day. I'll fix the test. I didn't
know it was failing since I couldn't get the test suite to run on my pc
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:10>
Comment (by Michal Dabski):
Should be ready now; tests added, documentation updated. Any more
feedback?
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:11>
* needs_tests: 1 => 0
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:12>
* owner: Michal Dabski => (none)
* status: assigned => new
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:13>
* owner: (none) => Tim Graham <timograham@…>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"d381914aef50e04ca44b9d7bb9274c8351f5b9bf" d381914]:
{{{
#!CommitTicketReference repository=""
revision="d381914aef50e04ca44b9d7bb9274c8351f5b9bf"
Fixed #28313 -- Added model name max length check of 100 characters in
contrib.contentttypes.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28313#comment:14>