          if cursor and table_name_converter(model._meta.db_table) in table_names:
              # Drop the table now
              output.append('%s %s;' % (style.SQL_KEYWORD('DROP TABLE'),
                  style.SQL_TABLE(qn(model._meta.db_table))))
              if backend.supports_constraints and model in references_to_delete:
                  for rel_class, f in references_to_delete[model]:
                      table = rel_class._meta.db_table
                      col = f.column
                      r_table = model._meta.db_table
                      r_col = model._meta.get_field(f.rel.field_name).column
 
</s> remove     if backend.supports_constraints:
 </s> add     if connection.features.supports_constraints: </s> remove     from django.db import backend, models
 </s> add     from django.db import connection, models </s> remove         if f.db_index and not ((f.primary_key or f.unique) and backend.autoindexes_primary_keys):
 </s> add         if f.db_index and not ((f.primary_key or f.unique) and connection.features.autoindexes_primary_keys): </s> remove             if tablespace and backend.supports_tablespaces:
 </s> add             if tablespace and connection.features.supports_tablespaces: </s> remove             if tablespace and backend.supports_tablespaces and backend.autoindexes_primary_keys:
 </s> add             if tablespace and connection.features.supports_tablespaces and connection.features.autoindexes_primary_keys:
            if connection.features.supports_constraints and model in references_to_delete:
          if cursor and table_name_converter(model._meta.db_table) in table_names:
              # Drop the table now
              output.append('%s %s;' % (style.SQL_KEYWORD('DROP TABLE'),
                  style.SQL_TABLE(qn(model._meta.db_table))))
            if connection.features.supports_constraints and model in references_to_delete:
                  for rel_class, f in references_to_delete[model]:
                      table = rel_class._meta.db_table
                      col = f.column
                      r_table = model._meta.db_table
                      r_col = model._meta.get_field(f.rel.field_name).column
keep keep keep keep replace keep keep keep keep keep
 Implemented BaseDatabaseFeatures and changed all code to access it -- connection.features.foo instead of backend.foo

git-svn-id: http://code.djangoproject.com/svn/django/trunk@5974 bcc190cf-cafb-0310-a4f2-bffc1f526a37 
django/core/management/sql.py