#9348: manage.py reset appname fails to reset MySql database because of foreign
key constraints
-----------------------------+----------------------------------------------
Reporter: jfenwick | Owner: nobody
Status: new | Milestone:
Component: django-admin.py | Version: 1.0
Keywords: mysql reset | Stage: Unreviewed
Has_patch: 0 |
-----------------------------+----------------------------------------------
I'm running the latest Django from SVN on Windows XP using MySQL as the
database.
When I try to reset the database the following happens:
{{{
C:\projects\django\foo>python manage.py reset fooapp
You have requested a database reset.
This will IRREVERSIBLY DESTROY any data for
the "fooapp" application in the database "foo".
Are you sure you want to do this?
Type 'yes' to continue, or 'no' to cancel: yes
Error: Error: weather couldn't be reset. Possible reasons:
* The database isn't running or isn't configured correctly.
* At least one of the database tables doesn't exist.
* The SQL was invalid.
Hint: Look at the output of 'django-admin.py sqlreset fooapp'. That's the
SQL t
his command wasn't able to run.
The full error: (1217, 'Cannot delete or update a parent row: a foreign
key cons
traint fails')
}}}
If I run manage.py sqlreset fooapp and copy the generated SQL into the
MySQL command line the tables are recreated correctly.
--
Ticket URL: <http://code.djangoproject.com/ticket/9348>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" 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-updates?hl=en
-~----------~----~----~----~------~----~------~--~---