From: Ken Youens-Clark Date: Wed, 5 Nov 2003 22:27:55 +0000 (+0000) Subject: Fixing default datatype if unknown. X-Git-Tag: v0.04~27 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0a91d33e09e944438b3994cb4ed26398171c375f;p=dbsrgits%2FSQL-Translator.git Fixing default datatype if unknown. --- diff --git a/lib/SQL/Translator/Producer/Oracle.pm b/lib/SQL/Translator/Producer/Oracle.pm index 9855f05..61b415e 100644 --- a/lib/SQL/Translator/Producer/Oracle.pm +++ b/lib/SQL/Translator/Producer/Oracle.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::Oracle; # ------------------------------------------------------------------- -# $Id: Oracle.pm,v 1.27 2003-10-15 20:39:15 kycl4rk Exp $ +# $Id: Oracle.pm,v 1.28 2003-11-05 22:27:55 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2003 Ken Y. Clark , # darren chamberlain , @@ -41,7 +41,7 @@ Creates an SQL DDL suitable for Oracle. use strict; use vars qw[ $VERSION $DEBUG $WARN ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.27 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.28 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; use SQL::Translator::Schema::Constants; @@ -216,7 +216,8 @@ sub produce { else { $data_type = defined $translate{ $data_type } ? $translate{ $data_type } : - die "Unknown datatype: $data_type\n"; + $data_type; + $data_type ||= 'varchar2'; } #