-
Notifications
You must be signed in to change notification settings - Fork 96
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add columns if QDjangoModel changes #15
Comments
On 03/11/2014 09:18 AM, Franciso Javier Feijoo Cano wrote:
Having fully fledged support for migrations is a complex task (adding If you really want to tackle it I suggest looking at south [1] for |
Hi Jeremy, I'll have a look. I understand that supporting migrations can be really complex. But right now, if you install your app in a customer, and for some reason modify your model, then you don't have any choice (apart from running a script on the db which I would like to avoid). I'm testing QDjango, not in any production app, and this is something a bit worrying. I'm willing to help (as long as I'm capable to), could you think about a minimum set of features regarding migrations that would make you happy? Thanks. |
Hi,
Right now if you modify a field on your model, you need to delete the table to make it work. The select statements use column names that doesn't exist and fails.
I would like to discuss if you are interested on adding a new feature to regenerate the tables (adding columns) if the model changes.
Basically, in createTable(), if the table exists then check the columns of the table and the fields of the model, if any of the fields is not in the table, alter the table accordingly.
Does it have sense? Otherwise, is there any other method instead of removing the table?
Thanks.
The text was updated successfully, but these errors were encountered: