Skip to content
This repository has been archived by the owner on Jan 22, 2018. It is now read-only.

not save migration process. #4

Open
pussbb opened this issue Jul 22, 2013 · 1 comment
Open

not save migration process. #4

pussbb opened this issue Jul 22, 2013 · 1 comment
Labels

Comments

@pussbb
Copy link

pussbb commented Jul 22, 2013

Maybe I'm wrong but I couldn't find in code where transaction starts. It's important because we never will know where and why Exception could raise. So each actions which applies change to database must be started with initializing transaction and if something went wrong we can roll-back changes to previous state. In this way we are preventing situation when changes to database were partial.

@ivank
Copy link
Contributor

ivank commented Jul 22, 2013

Hi Alex
I've thought about this angle and the issue is mainly with mysql as table modifications are not atomic and are not part of the transaction. So transactions can only work on instances where there are no ALTER TABLE commands which I think is quite rare and if I add them you could end up with a greater mess. Other databases (e.g. Postgre) don't have this issue but we're not using it at all so we don't even have a driver for that.

Generally I'm planning a rewrite of the whole library to be database agnostic and steal some great ideas from here: http://www.kickstarter.com/projects/andrewgodwin/schema-migrations-for-django so stay tuned for great stuff in the coming months :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants