Author: ikelly
Date: 2008-12-02 10:59:39 -0600 (Tue, 02 Dec 2008)
New Revision: 9547
Modified:
django/branches/releases/1.0.X/
django/branches/releases/1.0.X/django/db/backends/__init__.py
django/branches/releases/1.0.X/django/db/models/fields/related.py
Log:
[1.0.X] Fixed a pair of bugs in determining the set of models to flush that
were causing test cause failures in Oracle after [9536].
Property changes on: django/branches/releases/1.0.X
___________________________________________________________________
Name: svnmerge-integrated
-
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9523,9535,9543-9544
+
/django/trunk:1-9097,9099-9102,9104-9109,9111,9113-9144,9146-9151,9153-9156,9158-9159,9161-9187,9189-9247,9249-9262,9264-9277,9279-9298,9301-9302,9305-9331,9333-9343,9345,9347,9350-9352,9355-9396,9399-9462,9466-9469,9471-9488,9491-9523,9535,9543-9544,9546
Modified: django/branches/releases/1.0.X/django/db/backends/__init__.py
===================================================================
--- django/branches/releases/1.0.X/django/db/backends/__init__.py
2008-12-02 16:58:06 UTC (rev 9546)
+++ django/branches/releases/1.0.X/django/db/backends/__init__.py
2008-12-02 16:59:39 UTC (rev 9547)
@@ -404,7 +404,7 @@
tables.add(model._meta.db_table)
tables.update([f.m2m_db_table() for f in
model._meta.local_many_to_many])
if only_existing:
- tables = [t for t in tables if t in self.table_names()]
+ tables = [t for t in tables if self.table_name_converter(t) in
self.table_names()]
return tables
def installed_models(self, tables):
Modified: django/branches/releases/1.0.X/django/db/models/fields/related.py
===================================================================
--- django/branches/releases/1.0.X/django/db/models/fields/related.py
2008-12-02 16:58:06 UTC (rev 9546)
+++ django/branches/releases/1.0.X/django/db/models/fields/related.py
2008-12-02 16:59:39 UTC (rev 9547)
@@ -1,4 +1,5 @@
from django.db import connection, transaction
+from django.db.backends import util
from django.db.models import signals, get_model
from django.db.models.fields import AutoField, Field, IntegerField,
PositiveIntegerField, PositiveSmallIntegerField, FieldDoesNotExist
from django.db.models.related import RelatedObject
@@ -771,7 +772,8 @@
elif self.db_table:
return self.db_table
else:
- return '%s_%s' % (opts.db_table, self.name)
+ return util.truncate_name('%s_%s' % (opts.db_table, self.name),
+ connection.ops.max_name_length())
def _get_m2m_column_name(self, related):
"Function that can be curried to provide the source column name for
the m2m table"
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---