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

Migrations do not ignore unmanaged models (unlike syncdb) #11196

Closed
wants to merge 1 commit into from
Closed

Migrations do not ignore unmanaged models (unlike syncdb) #11196

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Apr 12, 2019

Migrations do not ignore unmanaged models (unlike syncdb); Ticket #22331; Adding this fix to 1.11.x

This has already been fixed in version 2. Related ticket is 22331. Can we please get this into the latest stable version 1 release

@charettes
Copy link
Member

Sorry but per our release process only security fixes qualify for backport to 1.11.x at this point.

@charettes charettes closed this Apr 12, 2019
@ghost
Copy link
Author

ghost commented Apr 12, 2019

Hi @charettes. Thank you for your response. That's a bit of a pain, since this solution has already been vetted and accepted in version 2: It is the exact same patch. It is a bit of a pain, because this means that if you ever use unmanaged models in version 1, you will be unable to run any tests. Do you then recommend that version 1 users (who perhaps, like me, have to use version 1 because we are working with other packages that are not yet compatible with version 2), do you then recommend that we not use unmanaged models at all? Certainly you wouldn't recommend using a feature like unmanaged models without any tests in any production system, would you?

@felixxm
Copy link
Member

felixxm commented Apr 12, 2019

@jackvz You can always patch your Django locally. Django 2.0 has been released a long time ago on Dec 2, 2017. If you're using 3rd party packages that don't support Django 2.0 then maybe you can put some effort to help them 💊 or if they are completely abandoned you can create you're own fork, or use other packages etc. There are many possible solutions, IMO.

@ghost
Copy link
Author

ghost commented Apr 12, 2019

Hi @felixxm. Thank you, that is indeed what I am doing. Well, patching it locally and also patching a package that I've released.

The 3rd party packages are still actively being worked on, however it is an extension to a package that still depend on Django 1, specifically an extension to Mezzanine (more on the latest work in September last year on getting it Django 2 ready here) called Cartridge.

I appreciate the suggestions though: Yes there are loads of possible solutions.

I am a little surprised at the rigidity of how this patch was summarily rejected. I assume that the part in the release process that @charettes referred to is "These releases will get security and data loss fixes applied for a guaranteed period of time, typically three years." and that is fair enough. I just find it surprising that there is a feature, unmanaged models, in version 1, that if used, prevents ANY tests from running. It is not simply a matter of excluding 1 test: The test runner will simply not run for any and all tests, and this is thoroughly documented here and here.

Just to illustrate that this pull request was not made on a whim, but I appreciate the rules, and do indeed plan to look at contributing to the 3rd party packages, but I thought this simple fix, already vetted and accepted in version 2, would be a good contribution to make to the stable version 1x release of Django.

@glassresistor
Copy link

I'm using Django 2.1.8 and still having issues with this. I have 100s of unmanaged models which are adding 30sec to migrations and it makes migrations everytime i change them.

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