Ticket #3549: 3549.diff

File 3549.diff, 798 bytes (added by jaran, 18 years ago)
  • django/core/management.py

     
    332332        opts = model._meta
    333333        for f in opts.many_to_many:
    334334            if cursor and f.m2m_db_table() in table_names:
    335                 output.append("%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),
    336                     style.SQL_TABLE(backend.quote_name(f.m2m_db_table()))))
     335                drop_statement = "%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),
     336                    style.SQL_TABLE(backend.quote_name(f.m2m_db_table())))
     337                if drop_statement not in output:
     338                    output.append(drop_statement)
    337339
    338340    app_label = app_models[0]._meta.app_label
    339341
Back to Top