Issue 105 in django-evolution: django-evolution executes evolutions on invalid models

1 view
Skip to first unread message

codesite...@google.com

unread,
Jul 25, 2009, 5:32:45 AM7/25/09
to django-evolu...@googlegroups.com
Status: New
Owner: ----

New issue 105 by Lukasz.Langa: django-evolution executes evolutions on
invalid models
http://code.google.com/p/django-evolution/issues/detail?id=105

What steps will reproduce the problem?
1. In a valid, existing model add a CharField.
2. Don't use max_length in the CharField definition.
3. python manage.py evolve --hint

I would expect django_evolution to yell at me that the model is invalid.
Instead, it says "Trial evolution successful".

I know that syncdb does this. The problem is that the workflow I'm often
meet is to use "syncdb; evolve" when new models are created and only
"evolve" otherwise.

If you couldn't integrate the "syncdb" command in "evolve" itself (possibly
infeasible for people with custom stored evolutions?), you could clearly
point out that "syncdb" provides more sophisticated validation. Especially
in case of a failed execution which in the case provided above only gives:

'Error applying evolution: near "None": syntax error'

(this is on SQLite)

On that error, a simple remark like 'Try running "syncdb" first.' would be
very helpful.

Of course, the ultimately better solution would be to enhance the
validations done on the model in django_evolution. Maybe incorporate the
ones already done in 'syncdb'?

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

Reply all
Reply to author
Forward
0 new messages