Author: russellm
Date: 2008-11-29 05:55:05 -0600 (Sat, 29 Nov 2008)
New Revision: 9536
Modified:
django/branches/releases/1.0.X/
django/branches/releases/1.0.X/django/core/management/sql.py
Log:
[1.0.X] Fixed #9717 -- Corrected a problem where django-admin.py flush would
attempt to flush database tables that had not yet been created. This occurred
when an application had been added to INSTALLED_APPS, but had not yet been
synchronized. Thanks to Julien Phalip for the patch.
Merge of [9535] from trunk.
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
+
/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
Modified: django/branches/releases/1.0.X/django/core/management/sql.py
===================================================================
--- django/branches/releases/1.0.X/django/core/management/sql.py
2008-11-29 11:51:41 UTC (rev 9535)
+++ django/branches/releases/1.0.X/django/core/management/sql.py
2008-11-29 11:55:05 UTC (rev 9536)
@@ -119,13 +119,13 @@
def sql_flush(style, only_django=False):
"""
Returns a list of the SQL statements used to flush the database.
-
+
If only_django is True, then only table names that have associated Django
models and are in INSTALLED_APPS will be included.
"""
from django.db import connection
if only_django:
- tables = connection.introspection.django_table_names()
+ tables =
connection.introspection.django_table_names(only_existing=True)
else:
tables = connection.introspection.table_names()
statements = connection.ops.sql_flush(style, tables,
connection.introspection.sequence_list())
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---