Hi, About Django database migration. I know there's a couple of tools available (South, evolution, dmigration, etc), but I am pondering an alternative here. Hope good discussion entails.
This is what I am doing manually now for my database migration needs. 1. Use Django's management command "dumpdata" to get the JSON representative of an app. Save the JSON into a file (oldmodel.json). 2. Git pull the latest code. And do a reset to the app. So the database will have the new model schema now. 3. Use the python shell to migrate the JSON file to match the new model representation. Save the new JSON into a file (newmodel.json). 4. Use management command "loaddata" to populate the new model with the newmodel.json. This has work well so far for my use with PostgreSQL, albeit very manual. It's all Python code. So I guess what I want to ask Django experts/developers here is that: 1. Is there any reason this shouldn't be done? 2. Any technical challenge that prevent this method from being realized into a more automate tool? (I read somewhere that dumpdata doesn't always work?) 3. What do you think about having migration code be more part of the deployment tool, rather than couple into the source code ? Thanks. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---