Django

Code

Changeset 88

Show
Ignore:
Timestamp:
07/15/05 18:43:17 (3 years ago)
Author:
adrian
Message:

Changed 'django-admin sqlclear' to output deletion of content_types table now that we're not using ON DELETE CASCADE anymore

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/trunk/django/bin/django-admin.py

    r87 r88  
    128128                output.append("DROP TABLE %s_%s;" % (opts.db_table, f.name)) 
    129129    output.append("DELETE FROM packages WHERE label = '%s';" % mod._MODELS[0]._meta.app_label) 
     130    output.append("DELETE from content_types WHERE package = '%s';" % mod._MODELS[0]._meta.app_label) 
    130131    return output[::-1] # Reverse it, to deal with table dependencies. 
    131132get_sql_delete.help_doc = "Prints the DROP TABLE SQL statements for the given app(s)."