From: Alexander Hartmaier Date: Tue, 16 Sep 2014 18:35:32 +0000 (+0200) Subject: Fix Oracle producer X-Git-Tag: v0.11021~26 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ad5cf454c0eb596a777488a9234582f2dc9b8fd4;p=dbsrgits%2FSQL-Translator.git Fix Oracle producer generating an unnecessary / at the end in case there are no triggers --- diff --git a/Changes b/Changes index 5311175..7b6dc0a 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,7 @@ Changes for SQL::Translator + * Fix Oracle producer generating an unnecessary / at the end in case there + are no triggers * Skip HTML tests if CGI is not installed (RT#98027) 0.11020 2014-09-02 diff --git a/lib/SQL/Translator/Producer/Oracle.pm b/lib/SQL/Translator/Producer/Oracle.pm index 46a24a5..9b8adbc 100644 --- a/lib/SQL/Translator/Producer/Oracle.pm +++ b/lib/SQL/Translator/Producer/Oracle.pm @@ -248,10 +248,9 @@ sub produce { $create .= ";\n\n"; # If wantarray is not set we have to add "/" in this statement # DBI->do() needs them omitted - # triggers may NOT end with a semicolon - $create .= join "/\n\n", @trigger_defs; - # for last trigger - $create .= "/\n\n"; + # triggers may NOT end with a semicolon but a "/" instead + $create .= "$_/\n\n" + for @trigger_defs; return $create; } }