Django - sqlclear fails to delete database with AbstractUser foreign key constraints
问题 I'm using Django 1.6 + MySQL. My model has a custom_user class that extends AbstractUser. class CustomUser(AbstractUser): dob = models.DateField() class Meta: db_table = 'custom_user' I want to delete the database with ./manage.py sqlclear | ./manage.py dbshell (as mentioned here) The output of sqlclear is BEGIN; DROP TABLE `design`; DROP TABLE `company`; ALTER TABLE `custom_user_user_permissions` DROP FOREIGN KEY `customuser_id_refs_id_da27cb33`; ALTER TABLE `custom_user_groups` DROP FOREIGN