Django content types and sqlmigrate

12 views
Skip to first unread message

jer...@netki.com

unread,
May 9, 2018, 2:41:36 PM5/9/18
to Django users
Hello,

I’ve got a question regarding the django_content_type table and sqlmigrate.  At work we use sqlmigrate to generate the SQL that is used to create/update tables in production and only use manage.py migrate for local updates and changes.  This has been working fine for us until we started to need some generic foreign keys.  It turns out that migrate command creates entries in the django_content_type table but those entries are not included in the sqlmigrate output.  Is there a way to get those SQL commands so that we can also create those in our production database when we are creating new models?  I've been unable to find much information about this using Google.

Thank you very much for your assistance!

Jeremy
Reply all
Reply to author
Forward
0 new messages