Changeset 5036
- Timestamp:
- 04/19/07 16:17:29 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/branches/boulder-oracle-sprint/django/core/management.py
r5028 r5036 179 179 data_type = f.get_internal_type() 180 180 col_type = data_types[data_type] 181 tablespace = f. tablespace or opts.tablespace181 tablespace = f.db_tablespace or opts.db_tablespace 182 182 if col_type is not None: 183 183 # Make the definition (e.g. 'foo VARCHAR(30)') for this field. … … 217 217 full_statement.append(' %s%s' % (line, i < len(table_output)-1 and ',' or '')) 218 218 full_statement.append(')') 219 if opts. tablespace and backend.supports_tablespaces:220 full_statement.append(backend.get_tablespace_sql(opts. tablespace))219 if opts.db_tablespace and backend.supports_tablespaces: 220 full_statement.append(backend.get_tablespace_sql(opts.db_tablespace)) 221 221 full_statement.append(';') 222 222 final_output.append('\n'.join(full_statement)) … … 267 267 for f in opts.many_to_many: 268 268 if not isinstance(f.rel, GenericRel): 269 tablespace = f. tablespace or opts.tablespace269 tablespace = f.db_tablespace or opts.db_tablespace 270 270 if tablespace and backend.supports_tablespaces and backend.autoindexes_primary_keys: 271 271 tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace, inline=True) … … 299 299 tablespace_sql)) 300 300 table_output.append(')') 301 if opts. tablespace and backend.supports_tablespaces:302 # f. tablespace is only for indices, so ignore its value here.303 table_output.append(backend.get_tablespace_sql(opts. tablespace))301 if opts.db_tablespace and backend.supports_tablespaces: 302 # f.db_tablespace is only for indices, so ignore its value here. 303 table_output.append(backend.get_tablespace_sql(opts.db_tablespace)) 304 304 table_output.append(';') 305 305 final_output.append('\n'.join(table_output)) … … 484 484 if f.db_index and not ((f.primary_key or f.unique) and backend.autoindexes_primary_keys): 485 485 unique = f.unique and 'UNIQUE ' or '' 486 tablespace = f. tablespace or model._meta.tablespace486 tablespace = f.db_tablespace or model._meta.db_tablespace 487 487 if tablespace and backend.supports_tablespaces: 488 488 tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace) django/branches/boulder-oracle-sprint/django/db/models/fields/__init__.py
r5035 r5036 71 71 prepopulate_from=None, unique_for_date=None, unique_for_month=None, 72 72 unique_for_year=None, validator_list=None, choices=None, radio_admin=None, 73 help_text='', db_column=None, tablespace=None):73 help_text='', db_column=None, db_tablespace=None): 74 74 self.name = name 75 75 self.verbose_name = verbose_name … … 88 88 self.help_text = help_text 89 89 self.db_column = db_column 90 self. tablespace =tablespace90 self.db_tablespace = db_tablespace 91 91 92 92 # Set db_index to True if the field has a relationship and doesn't explicitly set db_index. django/branches/boulder-oracle-sprint/django/db/models/options.py
r5022 r5036 14 14 DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering', 15 15 'unique_together', 'permissions', 'get_latest_by', 16 'order_with_respect_to', 'app_label', ' tablespace')16 'order_with_respect_to', 'app_label', 'db_tablespace') 17 17 18 18 class Options(object): … … 28 28 self.get_latest_by = None 29 29 self.order_with_respect_to = None 30 self. tablespace = None30 self.db_tablespace = None 31 31 self.admin = None 32 32 self.meta = meta
