From: Justin Hunter Date: Sat, 5 Sep 2009 16:45:09 +0000 (-0700) Subject: need to sort tables to ensure ordering X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=246d8d9cdfa9c5c4ecff0b0cbd6b30417263130a;p=dbsrgits%2FSQL-Translator-2.0-ish.git need to sort tables to ensure ordering --- diff --git a/lib/SQL/Translator/Parser/DDL/SQLite.pm b/lib/SQL/Translator/Parser/DDL/SQLite.pm index 5cea747..b24307b 100644 --- a/lib/SQL/Translator/Parser/DDL/SQLite.pm +++ b/lib/SQL/Translator/Parser/DDL/SQLite.pm @@ -37,7 +37,7 @@ role SQL::Translator::Parser::DDL::SQLite { my $schema = $translator->schema; my @tables = map { $_->[1] } -# sort { $a->[0] <=> $b->[0] } + sort { $a->[0] <=> $b->[0] } map { [ $result->{'tables'}{ $_ }->{'order'}, $_ ] } keys %{ $result->{'tables'} };