#33177: Setting DATABASES[alias]["TEST"]["MIGRATE"] = False should mean that
`migrate` isn't run.
-----------------------------------+--------------------------------------
Reporter: Daniel Quinn | Owner: nobody
Type: New feature | Status: closed
Component: Testing framework | Version: dev
Severity: Normal | Resolution: wontfix
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Mariusz Felisiak):
* status: new => closed
* type: Bug => New feature
* resolution: => wontfix
Comment:
Thanks for the report.
> It seems to me that if there's a flag called `MIGRATE` that you can set
to `False`, that that would mean "don't run `migrate` for this database".
It's strictly documented how `MIGRATE` works: ''"When set to False,
**migrations** won’t run when creating the test database. This is similar
to setting `None` as a value in `MIGRATION_MODULES`, but for all apps."'',
more details can be found in `MIGRATION_MODULES` docs.
''"**migrations won’t** run when creating the test database"'' it's not
the same as ''"**`migrate` command won't** run"''.
> If there's a compelling reason to still run `migrate` against all
databases listed, it would be good then at least to mention in the docs
that this is what's actually happening.
Yes it's see #32012 and 77caeaea888d1744416b213036ff29699758de76.
I don't think that your use case with a custom workflow and a custom
`TestCase` is (or should be) supported by the `MIGRATE` setting. You can
try to create a custom `migrate` command and skip apps without a migration
module.
--
Ticket URL: <https://code.djangoproject.com/ticket/33177#comment:1>
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/068.24a6f4e0eec2dfd5693f7253fddadfb5%40djangoproject.com.