Sunday, May 30, 2010

Re: How can I test the correctness of my models against the schema of a database?

That gives you the SQL Statements for an application. What I want is a
way so Django checks the models against the database defined in
settings.

On May 31, 12:14 am, knicholes <knicho...@yahoo.com> wrote:
> python manage.py sqlall <appname>
>
> On May 30, 3:53 pm, David Horat <david.ho...@gmail.com> wrote:
>
>
>
> > Dear group,
>
> > How can I test the correctness of my models against the schema of a
> > database?
>
> > To solve this question, I have tried unsuccessfully several options:
> > - Using ./manage.py test triggers the creation and destruction of a
> > database, but I want to check the correctness of the model against a
> > production database, since I just want to check the schema, not the
> > content.
> > - Creating my own test runner as specified herehttp://stackoverflow.com/questions/138851
> > which basically hacks the Django stack and gives you other problems.
> > In any case this seems not to be the correct way.
>
> > Has anyone of you faced this situation before? Any clues?
>
> > Thank you in advance.
>
> > Best Regards,
> > David Horat

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

No comments:

Post a Comment