- Django 1.9 application with two databases:
- Legacy database with readonly access via unmanaged models. Both Django models (models.py) and related migrations have "managed" set to
False
'managed': False
- Default database holding django specific tables (e.g. auth_user, django_content_type, etc)
- Legacy database with readonly access via unmanaged models. Both Django models (models.py) and related migrations have "managed" set to
- For testing I want to re-create the legacy database tables. In other words, during
python manage.py test
, tell Django to set "managed" toTrue
- There are several excellent blog posts on how to set "managed" to
True
during tests:
- There are several excellent blog posts on how to set "managed" to
- http://blog.birdhouse.org/2015/03/25/django-unit-tests-against-unmanaged-databases/