dssg / land-bank

Analytics tool to help the Cook County Land Bank acquire vacant and abandoned properties strategically.
http://dssg.io/projects#landbank
8 stars 8 forks source link

Install Django/DB migration management tool ("South") and apply it to our database tables so far #14

Closed skyinthecloud closed 11 years ago

skyinthecloud commented 11 years ago

The question was asked, "Doesn't Django have a syncdb command that lets you apply migrations to the database?"

syncdb will only ADD a NEW table. If we want to add/remove/change fields in a table/model, we have to drop and re-create the table for syncdb to work. South is a layer on top of Django that gives us the power to make these fine-grained changes to database tables.

Before trying to use South to do a migration on our db, assuming you have our code, see the bottom half of the following instructions on converting an existing Django app to use South: http://south.readthedocs.org/en/latest/convertinganapp.html#converting-an-app

skyinthecloud commented 11 years ago

Installed South and generated an initial migration file in commit 55594bbf277628c317da27f78c874b3142becd15