paltman-archive / nashvegas

Another database migration script runner for Django projects.
http://paltman.github.com/nashvegas
MIT License
97 stars 18 forks source link

Change migrations to be transactional #44

Closed dcramer closed 12 years ago

dcramer commented 12 years ago

This corrects some weird behavior we've seen by only running transactions on the current database. I know we briefly talked about transactions, but I want to confirm there are actual issues where migration A should rely on migration B, as that doesnt really seem like great design.

Specifically, each migration is run in its own transaction, and then syncdb is run, all within the single transaction. THis is committed and the next migration is run. Once all migrations are run on a database, it will run the loaddata command.

dcramer commented 12 years ago

Everything should be good now.

paltman commented 12 years ago

@dcramer excellent. @brosner and I have talked about going back to original model of nashvegas where each migration was executed in it's own transaction. this looks more elegant than the original solution and am excited to dig in to this for a deeper review before merging this in. thanks for all your contributions to nashvegas!