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

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

Modified: branches/1.0/lib/Doctrine/Export.php
===================================================================
--- branches/1.0/lib/Doctrine/Export.php        2008-08-25 18:42:34 UTC (rev 
4803)
+++ branches/1.0/lib/Doctrine/Export.php        2008-08-25 18:42:53 UTC (rev 
4804)
@@ -1152,13 +1152,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