Ticket #24051: django_tablespace_patch.diff

File django_tablespace_patch.diff, 692 bytes (added by douglasjreynolds, 9 years ago)

Tablespace patch of django.db.backends.schema

  • schema.py

    index 154f452..e198f6a 100644
    old new class BaseDatabaseSchemaEditor(object):  
    260260            "table": self.quote_name(model._meta.db_table),
    261261            "definition": ", ".join(column_sqls)
    262262        }
     263        # Add tablespace
     264        tablespace = model._meta.db_tablespace
     265        if tablespace and self.connection.features.supports_tablespaces:
     266            sql += " %s" % self.connection.ops.tablespace_sql(tablespace, inline=False)
     267
    263268        self.execute(sql, params)
    264269        # Add any index_togethers
    265270        for fields in model._meta.index_together:
Back to Top