From: Chris Hilton Date: Mon, 15 Jan 2007 19:18:45 +0000 (+0000) Subject: Added linefeeds so beginning of create view/procedure statements don't end up comment... X-Git-Tag: v0.11008~386 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5c5997ef0d520da444d08c10313169a627e0c9fb;p=dbsrgits%2FSQL-Translator.git Added linefeeds so beginning of create view/procedure statements don't end up commented out --- diff --git a/lib/SQL/Translator/Producer/SQLServer.pm b/lib/SQL/Translator/Producer/SQLServer.pm index 1cddddd..ff90bc0 100644 --- a/lib/SQL/Translator/Producer/SQLServer.pm +++ b/lib/SQL/Translator/Producer/SQLServer.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::SQLServer; # ------------------------------------------------------------------- -# $Id: SQLServer.pm,v 1.5 2006-05-05 16:41:26 duality72 Exp $ +# $Id: SQLServer.pm,v 1.6 2007-01-15 19:18:45 duality72 Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -56,7 +56,7 @@ List of values for an enum field. use strict; use vars qw[ $DEBUG $WARN $VERSION ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; $DEBUG = 1 unless defined $DEBUG; use Data::Dumper; @@ -349,7 +349,7 @@ sub produce { foreach ( $schema->get_views ) { my $name = $_->name(); $output .= "\n\n"; - $output .= "--\n-- View: $name\n--" unless $no_comments; + $output .= "--\n-- View: $name\n--\n\n" unless $no_comments; my $text = $_->sql(); $text =~ s/\r//g; $output .= $text; @@ -362,7 +362,7 @@ sub produce { foreach ( $schema->get_procedures ) { my $name = $_->name(); $output .= "\n\n"; - $output .= "--\n-- Procedure: $name\n--" unless $no_comments; + $output .= "--\n-- Procedure: $name\n--\n\n" unless $no_comments; my $text = $_->sql(); $text =~ s/\r//g; $output .= $text;