]> granicus.if.org Git - postgis/commitdiff
Drop tables in reverse order, reducing probability of fkey troubles
authorSandro Santilli <strk@keybit.net>
Sat, 24 Dec 2011 11:21:35 +0000 (11:21 +0000)
committerSandro Santilli <strk@keybit.net>
Sat, 24 Dec 2011 11:21:35 +0000 (11:21 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8558 b70326c6-7e19-0410-871a-916f4a2858ee

utils/create_undef.pl

index ed9085573986c5a9d561711470bb328f18a26f2c..2119fcf4638b088509b0bf2d47c429f945a9fceb 100755 (executable)
@@ -149,6 +149,9 @@ foreach my $view (@views)
 }
 
 print "-- Drop all tables.\n";
+# we reverse table definitions so foreign key constraints
+# are more likely not to get in our way
+@tables = reverse(@tables);
 foreach my $table (@tables)
 {
        print "DROP TABLE $table;\n";