Author: subzero2000
Date: 2008-08-25 19:42:34 +0100 (Mon, 25 Aug 2008)
New Revision: 4803

Modified:
   branches/0.11/lib/Doctrine/Export.php
Log:
Ensure unique queries are generated when generating SQL for exporting schema to 
database. Fixes #1371

Modified: branches/0.11/lib/Doctrine/Export.php
===================================================================
--- branches/0.11/lib/Doctrine/Export.php       2008-08-25 18:23:02 UTC (rev 
4802)
+++ branches/0.11/lib/Doctrine/Export.php       2008-08-25 18:42:34 UTC (rev 
4803)
@@ -1115,13 +1115,13 @@
          // Loop over all the sql again to merge everything together so it is 
in the correct order
          $build = array();
          foreach ($connections as $connectionName => $sql) {
-             $build[$connectionName] = array_merge($sql['create_tables'], 
$sql['create_sequences'], $sql['create_indexes'], $sql['alters']);
+             $build[$connectionName] = 
array_unique(array_merge($sql['create_tables'], $sql['create_sequences'], 
$sql['create_indexes'], $sql['alters']));
          }
 
          if ( ! $groupByConnection) {
              $new = array();
              foreach($build as $connectionname => $sql) {
-                 $new = array_merge($new, $sql);
+                 $new = array_unique(array_merge($new, $sql));
              }
              $build = $new;
          }


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"doctrine-svn" 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.co.uk/group/doctrine-svn?hl=en-GB
-~----------~----~----~----~------~----~------~--~---

Reply via email to