Fix DROP TABLE in SQL Server Producer
[dbsrgits/SQL-Translator.git] / lib / SQL / Translator / Generator / DDL / SQLServer.pm
index 4b3383e..9e35d89 100644 (file)
@@ -89,7 +89,7 @@ sub unique_constraint_multiple {
   'CREATE UNIQUE NONCLUSTERED INDEX ' .
    $self->unique_constraint_name($constraint) .
    ' ON ' . $self->quote($constraint->table->name) . ' (' .
-   join( ', ', $constraint->fields ) . ')' .
+   join( ', ', map $self->quote($_), $constraint->fields ) . ')' .
    ' WHERE ' . join( ' AND ',
     map $self->quote($_->name) . ' IS NOT NULL',
     grep { $_->is_nullable } $constraint->fields ) . ';'
@@ -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;