Author: ramiro
Date: 2011-01-20 20:15:13 -0600 (Thu, 20 Jan 2011)
New Revision: 15256

Modified:
   django/branches/releases/1.2.X/django/db/backends/creation.py
Log:
[1.2.X] Added a modification missed in r15241 (backport of r15239 to this 
branch.)

Modified: django/branches/releases/1.2.X/django/db/backends/creation.py
===================================================================
--- django/branches/releases/1.2.X/django/db/backends/creation.py       
2011-01-21 01:37:08 UTC (rev 15255)
+++ django/branches/releases/1.2.X/django/db/backends/creation.py       
2011-01-21 02:15:13 UTC (rev 15256)
@@ -350,8 +350,22 @@
         can_rollback = self._rollback_works()
         self.connection.settings_dict["SUPPORTS_TRANSACTIONS"] = can_rollback
 
-        call_command('syncdb', verbosity=verbosity, interactive=False, 
database=self.connection.alias)
+        call_command('syncdb',
+            verbosity=verbosity,
+            interactive=False,
+            database=self.connection.alias,
+            load_initial_data=False)
 
+        # We need to then do a flush to ensure that any data installed by
+        # custom SQL has been removed. The only test data should come from
+        # test fixtures, or autogenerated from post_syncdb triggers.
+        # This has the side effect of loading initial data (which was
+        # intentionally skipped in the syncdb).
+        call_command('flush',
+            verbosity=verbosity,
+            interactive=False,
+            database=self.connection.alias)
+
         if settings.CACHE_BACKEND.startswith('db://'):
             from django.core.cache import parse_backend_uri, cache
             from django.db import router

-- 
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