From: Brian O'Connor Date: Sat, 3 Jan 2004 03:13:39 +0000 (+0000) Subject: Fixed problem with Turnkey producer where the db connection string wasn't passes... X-Git-Tag: v0.06~241 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=cf927f9015caa20f7f0d98d48de6f23cd5b4ddf3;p=dbsrgits%2FSQL-Translator.git Fixed problem with Turnkey producer where the db connection string wasn't passes to the templates while generating the DBI output. --- diff --git a/lib/SQL/Translator/Producer/Turnkey.pm b/lib/SQL/Translator/Producer/Turnkey.pm index 45b312c..239c9c6 100644 --- a/lib/SQL/Translator/Producer/Turnkey.pm +++ b/lib/SQL/Translator/Producer/Turnkey.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::Turnkey; # ------------------------------------------------------------------- -# $Id: Turnkey.pm,v 1.16 2004-01-02 19:53:40 allenday Exp $ +# $Id: Turnkey.pm,v 1.17 2004-01-03 03:13:39 boconnor Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Allen Day , # Brian O'Connor . @@ -23,7 +23,7 @@ package SQL::Translator::Producer::Turnkey; use strict; use vars qw[ $VERSION $DEBUG ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.16 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.17 $ =~ /(\d+)\.(\d+)/; $DEBUG = 1 unless defined $DEBUG; use SQL::Translator::Schema::Constants; @@ -62,6 +62,7 @@ sub produce { baseclass => $baseclass, db_user => $args->{'db_user'} || '', db_pass => $args->{'db_pass'} || '', + db_str => $args->{'db_str'} || '', parser => $t->parser_type, producer => __PACKAGE__, dsn => $args->{'dsn'} || sprintf( 'dbi:%s:_', $producer2dsn{ $parser_type } @@ -339,7 +340,7 @@ package [% baseclass %]; use strict; use base qw(Class::DBI::Pg); -[% baseclass %]->set_db('Main', '[% db_str %]', '[% db_user %]', '[% db_pass %]'); +[% baseclass %]->set_db('Main', '[% db_str %]', '[% db_user %]', '[% db_pass %]'); [% FOREACH node = nodes %] [% printPackage(node.value) %]