#35711: Running migrate with disabled migrations fails with version 5.1
----------------------------+--------------------------------------
Reporter: Mounir | Owner: (none)
Type: Bug | Status: closed
Component: Migrations | Version: 5.1
Severity: Normal | Resolution: invalid
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
----------------------------+--------------------------------------
Comment (by Mounir):
Based from Django's docs:
When you supply None as a value for an app, Django will consider the
app as an app without migrations regardless of an existing migrations
submodule. This can be used, for example, in a test settings file to skip
migrations while testing (tables will still be created for the apps’
models). To disable migrations for all apps during tests, you can set the
MIGRATE to False instead. If MIGRATION_MODULES is used in your general
project settings, remember to use the migrate --run-syncdb option if you
want to create tables for the app.
So, when I tried to set MIGRATION_MODULES for each app to None (without
the `DisableMigrations` pattern) I still get the same error.
Background: I used this approach before running some e2e tests, which run
Django in a normal mode, disabling migrations helps speeding up the
process.
--
Ticket URL: <https://code.djangoproject.com/ticket/35711#comment:3>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/0107019197d9cbca-44250fdc-8f47-4025-be36-4b61127a3b21-000000%40eu-central-1.amazonses.com.