Author: bouldersprinters
Date: 2007-04-19 16:17:29 -0500 (Thu, 19 Apr 2007)
New Revision: 5036

Modified:
   django/branches/boulder-oracle-sprint/django/core/management.py
   django/branches/boulder-oracle-sprint/django/db/models/fields/__init__.py
   django/branches/boulder-oracle-sprint/django/db/models/options.py
Log:
boulder-oracle-sprint: Renamed the "tablespace" options to "db_tablespace".

Modified: django/branches/boulder-oracle-sprint/django/core/management.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/core/management.py     
2007-04-19 21:03:56 UTC (rev 5035)
+++ django/branches/boulder-oracle-sprint/django/core/management.py     
2007-04-19 21:17:29 UTC (rev 5036)
@@ -178,7 +178,7 @@
             rel_field = f
             data_type = f.get_internal_type()
         col_type = data_types[data_type]
-        tablespace = f.tablespace or opts.tablespace
+        tablespace = f.db_tablespace or opts.db_tablespace
         if col_type is not None:
             # Make the definition (e.g. 'foo VARCHAR(30)') for this field.
             field_output = [style.SQL_FIELD(backend.quote_name(f.column)),
@@ -216,8 +216,8 @@
     for i, line in enumerate(table_output): # Combine and add commas.
         full_statement.append('    %s%s' % (line, i < len(table_output)-1 and 
',' or ''))
     full_statement.append(')')
-    if opts.tablespace and backend.supports_tablespaces:
-        full_statement.append(backend.get_tablespace_sql(opts.tablespace))
+    if opts.db_tablespace and backend.supports_tablespaces:
+        full_statement.append(backend.get_tablespace_sql(opts.db_tablespace))
     full_statement.append(';')
     final_output.append('\n'.join(full_statement))
 
@@ -266,7 +266,7 @@
     final_output = []
     for f in opts.many_to_many:
         if not isinstance(f.rel, GenericRel):
-            tablespace = f.tablespace or opts.tablespace
+            tablespace = f.db_tablespace or opts.db_tablespace
             if tablespace and backend.supports_tablespaces and 
backend.autoindexes_primary_keys:
                 tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace, 
inline=True)
             else:
@@ -298,9 +298,9 @@
                 style.SQL_FIELD(backend.quote_name(f.m2m_reverse_name())),
                 tablespace_sql))
             table_output.append(')')
-            if opts.tablespace and backend.supports_tablespaces:
-                # f.tablespace is only for indices, so ignore its value here.
-                
table_output.append(backend.get_tablespace_sql(opts.tablespace))
+            if opts.db_tablespace and backend.supports_tablespaces:
+                # f.db_tablespace is only for indices, so ignore its value 
here.
+                
table_output.append(backend.get_tablespace_sql(opts.db_tablespace))
             table_output.append(';')
             final_output.append('\n'.join(table_output))
 
@@ -483,7 +483,7 @@
     for f in model._meta.fields:
         if f.db_index and not ((f.primary_key or f.unique) and 
backend.autoindexes_primary_keys):
             unique = f.unique and 'UNIQUE ' or ''
-            tablespace = f.tablespace or model._meta.tablespace
+            tablespace = f.db_tablespace or model._meta.db_tablespace
             if tablespace and backend.supports_tablespaces:
                 tablespace_sql = ' ' + backend.get_tablespace_sql(tablespace)
             else:

Modified: 
django/branches/boulder-oracle-sprint/django/db/models/fields/__init__.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/db/models/fields/__init__.py   
2007-04-19 21:03:56 UTC (rev 5035)
+++ django/branches/boulder-oracle-sprint/django/db/models/fields/__init__.py   
2007-04-19 21:17:29 UTC (rev 5036)
@@ -70,7 +70,7 @@
         core=False, rel=None, default=NOT_PROVIDED, editable=True, 
serialize=True,
         prepopulate_from=None, unique_for_date=None, unique_for_month=None,
         unique_for_year=None, validator_list=None, choices=None, 
radio_admin=None,
-        help_text='', db_column=None, tablespace=None):
+        help_text='', db_column=None, db_tablespace=None):
         self.name = name
         self.verbose_name = verbose_name
         self.primary_key = primary_key
@@ -87,7 +87,7 @@
         self.radio_admin = radio_admin
         self.help_text = help_text
         self.db_column = db_column
-        self.tablespace = tablespace
+        self.db_tablespace = db_tablespace
 
         # Set db_index to True if the field has a relationship and doesn't 
explicitly set db_index.
         self.db_index = db_index

Modified: django/branches/boulder-oracle-sprint/django/db/models/options.py
===================================================================
--- django/branches/boulder-oracle-sprint/django/db/models/options.py   
2007-04-19 21:03:56 UTC (rev 5035)
+++ django/branches/boulder-oracle-sprint/django/db/models/options.py   
2007-04-19 21:17:29 UTC (rev 5036)
@@ -13,7 +13,7 @@
 
 DEFAULT_NAMES = ('verbose_name', 'db_table', 'ordering',
                  'unique_together', 'permissions', 'get_latest_by',
-                 'order_with_respect_to', 'app_label', 'tablespace')
+                 'order_with_respect_to', 'app_label', 'db_tablespace')
 
 class Options(object):
     def __init__(self, meta):
@@ -27,7 +27,7 @@
         self.object_name, self.app_label = None, None
         self.get_latest_by = None
         self.order_with_respect_to = None
-        self.tablespace = None
+        self.db_tablespace = None
         self.admin = None
         self.meta = meta
         self.pk = None


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to