You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
On 03/11/2014 09:18 AM, Franciso Javier Feijoo Cano wrote:
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?
Having fully fledged support for migrations is a complex task (adding
columns is only one of the operations that need to be supported) which
is why I have held off implementing it so far.
If you really want to tackle it I suggest looking at south [1] for
inspiration.
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?
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: