Thanks, Matthias. This seemed to do the trick. On Thu, Apr 1, 2010 at 4:14 AM, Matthias Kestenholz <[email protected]> wrote:
> On Wed, Mar 31, 2010 at 11:57 PM, craig <[email protected]> wrote: > > I'm getting this error when trying to dump the database to a fixture: > > > > Error: Unable to serialize database: User matching query does not > > exist. > > > > > > Any idea what might be causing this? > > > > Yes, you have inconsistent entries in your database. There are records > pointing to your user table (f.e. created_by fields), but at users > which do not exist anymore. Alternatively, there may be NULLs in a > foreign key column because the column type in the database allows it, > but Django's model definition does not contain null=True. MySQLs > MyISAM tables do not support cascading updates and/or deletions, > that's why you can arrive in such a state. > > Btw, Django handles cascading deletes in python code, the reason does > not lie within Django itself -- you probably manipulated your database > by other means. > > Your only possibility is to find the records by hand, f.e. using > queries like this one: > > SELECT * FROM your_offending_table WHERE created_by_id NOT IN (SELECT > id FROM auth_user); > > > hth > Matthias > > -- > You received this message because you are subscribed to the Google Groups > "Satchmo users" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<satchmo-users%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/satchmo-users?hl=en. > > -- -co -- You received this message because you are subscribed to the Google Groups "Satchmo 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/satchmo-users?hl=en.
