0

I have a live Django site that already has registered users. I am trying to update the site with a new version that is different from the original site -similar idea but different models.

How can I keep the current users on the new site?

I have heard South may be a good solution, but the old site doesn't have it installed. Is it possible to use South in this case?

Thanks for the help!

Emile
  • 3,464
  • 8
  • 46
  • 77

2 Answers2

0

+1 to South, but...

We need more information! Are you doing radical changes to your Models, or just adding or removing fields here or there?

South can handle some pretty radical migrations, but you'll have to write some custom migration code. Personally, I use South if I'm adding a new field, but not for this kind of more radical stuff.

If it's a big Schema change, completely re-organizing your site, then I'd just write your own script to read the old objects, and create the new ones. Make a copy of your production database (via pg_dump, mysqldump, etc.) and load it on to your local machine, where you can test and debug the custom conversion script. Make sure your "old models" and "new models" have different names, and keep everything in your settings.py so that you can always read & write everything.

Write & test the migration script, and after that works, you can create another changelist to delete all the old objects, and then remove their corresponding source code if you want.

slacy
  • 11,397
  • 8
  • 56
  • 61