From: Arthur Axel 'fREW' Schmidt Date: Wed, 7 May 2014 16:55:44 +0000 (-0500) Subject: Fix DROP TABLE in SQL Server Producer X-Git-Tag: v0.11019~36 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f851dfea7b0f0ea8e6b1c5eab32d5d6fff8cc197;p=dbsrgits%2FSQL-Translator.git Fix DROP TABLE in SQL Server Producer --- diff --git a/Changes b/Changes index 64ce0c6..ceb30b6 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Changes for SQL::Translator + * Fix DROP TABLE in SQL Server Producer + 0.11018 2013-10-31 🎃 * Revert "Fix AUTOINCREMENT in SQLite" diff --git a/lib/SQL/Translator/Generator/DDL/SQLServer.pm b/lib/SQL/Translator/Generator/DDL/SQLServer.pm index 2141999..9e35d89 100644 --- a/lib/SQL/Translator/Generator/DDL/SQLServer.pm +++ b/lib/SQL/Translator/Generator/DDL/SQLServer.pm @@ -198,7 +198,7 @@ sub remove_table_constraints { } sub drop_tables { - my ($self, $schema) = shift; + my ($self, $schema) = @_; if ($self->add_drop_table) { my @tables = sort { $b->order <=> $a->order } $schema->get_tables; diff --git a/lib/SQL/Translator/Producer/SQLServer.pm b/lib/SQL/Translator/Producer/SQLServer.pm index c1181ca..ed9d156 100644 --- a/lib/SQL/Translator/Producer/SQLServer.pm +++ b/lib/SQL/Translator/Producer/SQLServer.pm @@ -14,7 +14,7 @@ sub produce { my $translator = shift; SQL::Translator::Generator::DDL::SQLServer->new( add_comments => !$translator->no_comments, - add_drop_tables => $translator->add_drop_table, + add_drop_table => $translator->add_drop_table, )->schema($translator->schema) }