On Apr 8, 11:13 am, Russell Keith-Magee <[email protected]>
wrote:
> On Wed, Apr 8, 2009 at 10:27 PM, Adam Nelson <[email protected]> wrote:
>
> > Is there any way to ignore fixtures when running syncdb? I'm using
> > django-command-extensions and when using runscript from a previous
> > datadump, I get a unique index violation. I'd like to be able to
> > ignore fixture imports.
>
> 1) Yes - you don't call your fixture initial_data. Any other name will
> result in a perfectly loadable fixture, but that fixture won't be
> automatically loaded.
>
> 2) If you're getting unique index violations from a fixture created by
> dumpdata, i'll wager you're hitting #7052. The solution here is to
> avoid dumping the auth permissions and contenttype datatypes as part
> of the datadump, or to delete the entries corresponding to permissions
> and contenttypes from your fixture. This may pose problems if your
> data contains generic keys, or any foreign keys on the auth
> permissions or content types, but otherwise you should be fine.
Perhaps there is a way to have runscript send errors to stdout rather
than dieing without any failure messages at all *sigh*. Thanks for
the specific response though. I'm going to try to learn South (since
this is really about a migration solution) which might sidestep this
entire issue and add my 2 cents to #7052.
Thanks,
Adam
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---