From 9c1c82cab91c3b72c4991fc37880bde77b161502 Mon Sep 17 00:00:00 2001 From: subzero2000 Date: Mon, 25 Aug 2008 19:11:58 +0000 Subject: [PATCH] Ensure unique queries are generated when generating SQL for exporting schema to database. --- lib/Doctrine/Export.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Doctrine/Export.php b/lib/Doctrine/Export.php index 6f4eeddfc..0a5fe7a17 100644 --- a/lib/Doctrine/Export.php +++ b/lib/Doctrine/Export.php @@ -117,7 +117,7 @@ class Doctrine_Export extends Doctrine_Connection_Module // Loop over all the sql again to merge the creates and alters in to the same array, but so that the alters are at the bottom $build = array(); foreach ($connections as $connectionName => $sql) { - $build[$connectionName] = array_merge($sql['create_tables'], $sql['create_sequences'], $sql['alters']); + $build[$connectionName] = array_unique(array_merge($sql['create_tables'], $sql['create_sequences'], $sql['alters'])); } foreach ($build as $connectionName => $sql) {