On 16/10/2014 7:11 AM, Ken Winter wrote:

4. Inspect a DB schema and modify the Django model set so that they
match completely.  Much harder, because it involves (a) comparing every
detail of each existing model with the DB schema, (b) altering and
deleting models as well as just creating them, and (c) dealing with the
problems that these alterations and deletions may cause for existing app
code.  The last point in particular is a big hurdle.  So level 4
functionality may not be worth the effort

Why not do it the other way around? Use inspectdb to produce the new models.py and just move the interesting code by hand from the original models.py.

I agree it seems a lot of effort for a one-time exercise.

I once wrote a script to split a monolithic models.py into multiple .py files in a models dir and it took a lot of effort for a one-time exercise which in hindsight wasn't worth it.

ymmv

Mike


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/543EF843.4040305%40dewhirst.com.au.
For more options, visit https://groups.google.com/d/optout.

Reply via email to