On Wed, Feb 4, 2009 at 11:57 PM, tow <toby.o.h.wh...@googlemail.com> wrote:
>
> Is there a way to do a dry run of "manage.py syncdb", to see what sql
> commands it's about to execute?
>
> "./manage.py sqlall" isn't good enough for my purposes because
>
> 1) I have to specify the list of applications myself
> (although it's easy enough to write a wrapper which will walk across
> INSTALLED_APPS; but it's not immediately obvious which apps already
> exist in the db such that no sql will be executed for them)
>
> 2) it takes no account of post-syncdb hooks. In particular,
> django.contrib.contenttypes automatically does some extra stuff which
> writes to the db after the tables are created. But I only know that
> now because it just bit me.
>
> How can I go about extracting the SQL which will *actually* be run?

At the moment, there isn't any way to do this. Ticket #8348 describes
the feature you are asking for.

That ticket contains a patch that implements the feature. I haven't
tried the patch myself, though.

Yours,
Russ Magee %-)

--~--~---------~--~----~------------~-------~--~----~
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+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to