From: Ken Youens-Clark Date: Wed, 14 Jul 2004 19:37:41 +0000 (+0000) Subject: Added "enum" to string types. X-Git-Tag: v0.06~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e42b8ca27bb42f6d83a145e051abd153e14dd22a;p=dbsrgits%2FSQL-Translator.git Added "enum" to string types. --- diff --git a/lib/SQL/Translator/Producer/Dumper.pm b/lib/SQL/Translator/Producer/Dumper.pm index 2bb2cb1..88370e5 100644 --- a/lib/SQL/Translator/Producer/Dumper.pm +++ b/lib/SQL/Translator/Producer/Dumper.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::Dumper; # ------------------------------------------------------------------- -# $Id: Dumper.pm,v 1.5 2004-04-23 12:46:53 kycl4rk Exp $ +# $Id: Dumper.pm,v 1.6 2004-07-14 19:37:41 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -61,7 +61,7 @@ use vars qw($VERSION); use Data::Dumper; -$VERSION = sprintf "%d.%02d", q$Revision: 1.5 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)\.(\d+)/; sub produce { my $t = shift; @@ -189,7 +189,7 @@ FOREACH table IN schema.get_tables; field_name = field.name; fname_len = field.name.length; max_field = fname_len > max_field ? fname_len : max_field; - types.$field_name = field.data_type.match( '(char|str|long|text)' ) + types.$field_name = field.data_type.match( '(char|str|long|text|enum)' ) ? 'string' : 'number'; field_names.push( field_name ); END;