From: Allen Day Date: Sat, 3 Jan 2004 04:03:56 +0000 (+0000) Subject: fixing bugs on sf turnkey tracker X-Git-Tag: v0.06~240 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=35276d8c007f85df3d7ed6baac8d7fbcb00eb131;p=dbsrgits%2FSQL-Translator.git fixing bugs on sf turnkey tracker --- diff --git a/lib/SQL/Translator/Producer/Turnkey.pm b/lib/SQL/Translator/Producer/Turnkey.pm index 239c9c6..c69cc65 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.17 2004-01-03 03:13:39 boconnor Exp $ +# $Id: Turnkey.pm,v 1.18 2004-01-03 04:03:56 allenday 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.17 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.18 $ =~ /(\d+)\.(\d+)/; $DEBUG = 1 unless defined $DEBUG; use SQL::Translator::Schema::Constants; @@ -60,6 +60,7 @@ sub produce { format_fk => $t->format_fk_name, template => $args->{'template'} || '', baseclass => $baseclass, + db_dsn => $args->{'db_dsn'} || '', db_user => $args->{'db_user'} || '', db_pass => $args->{'db_pass'} || '', db_str => $args->{'db_str'} || '', @@ -200,9 +201,6 @@ sub template { if($type eq 'dbi'){ return <set_db('Main', '[% db_str %]', '[% db_user %]', '[% db_pass %]'); +[% baseclass %]->set_db('Main', '[% db_dsn %]', '[% db_user %]', '[% db_pass %]', {AutoCommit=>1}); [% FOREACH node = nodes %] [% printPackage(node.value) %] @@ -363,7 +361,6 @@ package Turnkey::Atom::[% node.value.name FILTER replace "Turnkey::Model::", "" [% pname = node.value.name FILTER replace "Turnkey::Model::", "" %] - use base qw(Turnkey::Atom); use Data::Dumper;