sf-django icon indicating copy to clipboard operation
sf-django copied to clipboard

Django Deployment Databases

Open Amar-Chaudhari opened this issue 9 years ago • 1 comments

Hi Matt !

Thanks for the awesome presentation. I was wondering if you have any guide for moving migrations from development environment to production ? Doing python manage.py migrate on production creates lot of errors (tables/relation already exist etc) I wanted to know the best practise for to move migrations to production.

Thanks a lot !

Amar-Chaudhari avatar Dec 07 '15 00:12 Amar-Chaudhari

hi @Amar-Chaudhari, this is really going to depend on your particular project and development process. I'd definitely recommend you have a staging environment with a replica of the existing production database where you apply all migrations first before moving to prod. That's not always possible in every environment (such as with government regulated data) but for most projects that's the starting point for a working migration.

If you're running into a lot of migration errors, you'll have to track those issues down and find out why they keep reoccurring - it could be multiple developers on your team are stepping over one another or some of the migration files aren't being committed/pull properly between environments. It'll depend on your project and environment.

When I get a chance I'll create a migrations page for Full Stack Python based on prior experience that will be helpful.

mattmakai avatar Dec 07 '15 15:12 mattmakai