"\n);",
}
+sub drop_table {
+ my ($self, $table) = @_;
+ my $name = $table->name;
+ my $q_name = $self->quote($name);
+ "IF EXISTS (SELECT name FROM sysobjects WHERE name = '$name' AND type = 'U')" .
+ " DROP TABLE $q_name;\n"
+}
+
1;
$output .= "\n";
$output .= "--\n-- Drop tables\n--\n\n" unless $no_comments;
foreach my $table (@tables) {
- my $name = $table->name;
- my $q_name = unreserve($name);
- $output .= "IF EXISTS (SELECT name FROM sysobjects WHERE name = '$name' AND type = 'U') DROP TABLE $q_name;\n"
+ $output .= $future->drop_table($table);
}
}