I started a django 1.6 project in a virtual environment (Debian, python 2.7) and installed south.I created the models, database, performed many migrations and it all worked well. All with mysql.
I then split the settings.py file into production and development and set up a production server on apache with wsgi. I successfully moved the app to production using fabric, and can update production from development and it all works.
On the development machine I created two databases - inventory_dev and inventory_prod. I cheated, and just did a mysqldump of the original database and then inserted the dump file into the two databases. I can switch the app on the production machine from dev or prod databases easily.
My question is what happens when I change the database on the development machine. I can use south to migrate the database with no issues. I can deploy the new version of the app to the production machine with no issue. Since I have two settings.py files, can I migrate both the dev and prod databases on the production machine? Something like
./manage.py schemamigration --settings=production inventory --auto
./manage.py migrate --settings=production inventory
And then the same for --settings=development? Or, will south get its knickers in a twist with something like this.
I could drop the development database on the production machine if necessary. I am using it to see if the deployment works, as it has data in the database. The production database is currently empty, but I need to start filling it up soon. I think of the development database on the production machine as a testing database.
Thanks,
Mark