Fixed per Tony Bowden to allow all integer fields (including LARGEINT,
Ken Youens-Clark [Tue, 16 Mar 2004 13:29:11 +0000 (13:29 +0000)]
MEDIUMINT, etc.) to be translated to "INTEGER PRIMARY KEY."

lib/SQL/Translator/Producer/SQLite.pm

index 58bcbae..070fe1a 100644 (file)
@@ -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 !~ /,/ )
                 )