Ticket #12633: 12633.diff

File 12633.diff, 932 bytes (added by Ramiro Morales, 14 years ago)

Patch implementing fix suggested by Alex Gaynor

  • django/db/backends/creation.py

    diff -r 0b171fe8b1bc django/db/backends/creation.py
    a b  
    157157        from django.db.backends.util import truncate_name
    158158
    159159        output = []
    160         if f.creates_table:
     160        if f.auto_created:
    161161            opts = model._meta
    162162            qn = self.connection.ops.quote_name
    163163            tablespace = f.db_tablespace or opts.db_tablespace
     
    308308        "Returns the DROP TABLE statements for a single m2m field"
    309309        qn = self.connection.ops.quote_name
    310310        output = []
    311         if f.creates_table:
     311        if f.auto_created:
    312312            output.append("%s %s;" % (style.SQL_KEYWORD('DROP TABLE'),
    313313                style.SQL_TABLE(qn(f.m2m_db_table()))))
    314314            ds = self.connection.ops.drop_sequence_sql("%s_%s" % (model._meta.db_table, f.column))
Back to Top