                  style.SQL_FIELD(qn(f.m2m_column_name())),
                  style.SQL_FIELD(qn(f.m2m_reverse_name())),
                  tablespace_sql))
              table_output.append(')')
              if opts.db_tablespace and backend.supports_tablespaces:
                  # f.db_tablespace is only for indices, so ignore its value here.
                  table_output.append(connection.ops.tablespace_sql(opts.db_tablespace))
              table_output.append(';')
              final_output.append('\n'.join(table_output))
  
 
</s> remove     if opts.db_tablespace and backend.supports_tablespaces:
 </s> add     if opts.db_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: </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 backend.uses_case_insensitive_names:
 </s> add         if connection.features.uses_case_insensitive_names:
            if opts.db_tablespace and connection.features.supports_tablespaces:
                  style.SQL_FIELD(qn(f.m2m_column_name())),
                  style.SQL_FIELD(qn(f.m2m_reverse_name())),
                  tablespace_sql))
              table_output.append(')')
            if opts.db_tablespace and connection.features.supports_tablespaces:
                  # f.db_tablespace is only for indices, so ignore its value here.
                  table_output.append(connection.ops.tablespace_sql(opts.db_tablespace))
              table_output.append(';')
              final_output.append('\n'.join(table_output))
  
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