#33168: Meta.managed=False field not respected by makemigrations
--------------------------------------------------+------------------------
Reporter: Javier Domingo Cansino | Owner: nobody
Type: Bug | Status: new
Component: Migrations | Version: 3.2
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 have realised that Meta.managed field when set to False is not being
respected by makemigrations, sample script to reproduce, relies on having
django-admin in the path.
{{{
django-admin startproject sample
cd sample
python manage.py startapp unmanaged
echo 'from django.db import models
class ForeignUnmanagedTable(models.Model):
rowid = models.AutoField(primary_key=True)
class Meta:
managed = False
db_table = "foreign_unmanaged_table"
' > unmanaged/models.py
sed -i '/.*django.contrib.staticfiles.*/a
"unmanaged.apps.UnmanagedConfig", ' sample/settings.py
python manage.py makemigrations
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/33168>
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/049.771e63e96c152240e33a5f4f98b17ad9%40djangoproject.com.