Browse files

Changed 'django-admin sqlclear' to output deletion of content_types t…

…able now that we're not using ON DELETE CASCADE anymore

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent 0a35fce commit dc5f2506d1f8a196459e72ffa871877a40902b53 @adrianholovaty adrianholovaty committed Jul 15, 2005
Showing with 1 addition and 0 deletions.
  1. +1 −0 django/bin/
@@ -127,6 +127,7 @@ def get_sql_delete(mod):
output.append("DROP TABLE %s_%s;" % (opts.db_table,
output.append("DELETE FROM packages WHERE label = '%s';" % mod._MODELS[0]._meta.app_label)
+ output.append("DELETE from content_types WHERE package = '%s';" % mod._MODELS[0]._meta.app_label)
return output[::-1] # Reverse it, to deal with table dependencies.
get_sql_delete.help_doc = "Prints the DROP TABLE SQL statements for the given app(s)."
get_sql_delete.args = APP_ARGS

0 comments on commit dc5f250

Please sign in to comment.