#35549: The Model's Meta option managed doesn't do what the documentation says it
should.
-----------------------------------------+------------------------
Reporter: Tobi-De | Owner: nobody
Type: Bug | Status: new
Component: Uncategorized | Version: 5.0
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-----------------------------------------+------------------------
I'm not sure what I'm doing wrong here. It's something I've noticed for a
while (since Django 4.0), but I didn't think much of it. I thought I was
doing something wrong, but I just created a blank new Django 5 project
(
https://github.com/Tobi-De/django_managed_bug), added a new model with
managed = False, and then ran the makemigrations command. It created a
migration for a non-managed model, and running migrate created a table for
that model.
This is what the documentation says about non-managed models:
''If False, no database table creation, modification, or deletion
operations will be performed for this model. This is useful if the model
represents an existing table or a database view that has been created by
some other means. This is the only difference when managed=False. All
other aspects of model handling are exactly the same as normal. This
includes''
--
Ticket URL: <
https://code.djangoproject.com/ticket/35549>
Django <
https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.