From: Ken Youens-Clark Date: Tue, 16 Mar 2004 13:29:11 +0000 (+0000) Subject: Fixed per Tony Bowden to allow all integer fields (including LARGEINT, X-Git-Tag: v0.06~126 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=71c4d5ae13b21f1c4e613acadcc72e73dd13a770;p=dbsrgits%2FSQL-Translator.git Fixed per Tony Bowden to allow all integer fields (including LARGEINT, MEDIUMINT, etc.) to be translated to "INTEGER PRIMARY KEY." --- diff --git a/lib/SQL/Translator/Producer/SQLite.pm b/lib/SQL/Translator/Producer/SQLite.pm index 58bcbae..070fe1a 100644 --- a/lib/SQL/Translator/Producer/SQLite.pm +++ b/lib/SQL/Translator/Producer/SQLite.pm @@ -1,7 +1,7 @@ package SQL::Translator::Producer::SQLite; # ------------------------------------------------------------------- -# $Id: SQLite.pm,v 1.10 2004-02-09 23:02:17 kycl4rk Exp $ +# $Id: SQLite.pm,v 1.11 2004-03-16 13:29:11 kycl4rk Exp $ # ------------------------------------------------------------------- # Copyright (C) 2002-4 SQLFairy Authors # @@ -44,7 +44,7 @@ use SQL::Translator::Utils qw(debug header_comment); use vars qw[ $VERSION $DEBUG $WARN ]; -$VERSION = sprintf "%d.%02d", q$Revision: 1.10 $ =~ /(\d+)\.(\d+)/; +$VERSION = sprintf "%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/; $DEBUG = 0 unless defined $DEBUG; $WARN = 0 unless defined $WARN; @@ -122,7 +122,7 @@ sub produce { $field->is_primary_key && scalar @pk_fields == 1 && ( - $data_type =~ /^int(eger)?$/i + $data_type =~ /int(eger)?$/i || ( $data_type =~ /^number?$/i && $size !~ /,/ ) )