Django

Code

Changeset 5036

Show
Ignore:
Timestamp:
04/19/07 16:17:29 (2 years ago)
Author:
bouldersprinters
Message:

boulder-oracle-sprint: Renamed the "tablespace" options to "db_tablespace".

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/boulder-oracle-sprint/django/core/management.py

    r5028 r5036  
    179179            data_type = f.get_internal_type() 
    180180        col_type = data_types[data_type] 
    181         tablespace = f.tablespace or opts.tablespace 
     181        tablespace = f.db_tablespace or opts.db_tablespace 
    182182        if col_type is not None: 
    183183            # Make the definition (e.g. 'foo VARCHAR(30)') for this field. 
     
    217217        full_statement.append('    %s%s' % (line, i < len(table_output)-1 and ',' or '')) 
    218218    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)) 
    221221    full_statement.append(';') 
    222222    final_output.append('\n'.join(full_statement)) 
     
    267267    for f in opts.many_to_many: 
    268268        if not isinstance(f.rel, GenericRel): 
    269             tablespace = f.tablespace or opts.tablespace 
     269            tablespace = f.db_tablespace or opts.db_tablespace 
    270270            if tablespace and backend.supports_tablespaces and backend.autoindexes_primary_keys: 
    271271                tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace, inline=True) 
     
    299299                tablespace_sql)) 
    300300            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)) 
    304304            table_output.append(';') 
    305305            final_output.append('\n'.join(table_output)) 
     
    484484        if f.db_index and not ((f.primary_key or f.unique) and backend.autoindexes_primary_keys): 
    485485            unique = f.unique and 'UNIQUE ' or '' 
    486             tablespace = f.tablespace or model._meta.tablespace 
     486            tablespace = f.db_tablespace or model._meta.db_tablespace 
    487487            if tablespace and backend.supports_tablespaces: 
    488488                tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace) 
  • django/branches/boulder-oracle-sprint/django/db/models/fields/__init__.py

    r5035 r5036  
    7171        prepopulate_from=None, unique_for_date=None, unique_for_month=None, 
    7272        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): 
    7474        self.name = name 
    7575        self.verbose_name = verbose_name 
     
    8888        self.help_text = help_text 
    8989        self.db_column = db_column 
    90         self.tablespace = tablespace 
     90        self.db_tablespace = db_tablespace 
    9191 
    9292        # 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  
    1414DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering', 
    1515                 'unique_together', 'permissions', 'get_latest_by', 
    16                  'order_with_respect_to', 'app_label', 'tablespace') 
     16                 'order_with_respect_to', 'app_label', 'db_tablespace') 
    1717 
    1818class Options(object): 
     
    2828        self.get_latest_by = None 
    2929        self.order_with_respect_to = None 
    30         self.tablespace = None 
     30        self.db_tablespace = None 
    3131        self.admin = None 
    3232        self.meta = meta