MySQL patch for enum types from Andy Orr <aorr76@gmail.com>
authorivan <ivan>
Fri, 15 Apr 2005 13:15:34 +0000 (13:15 +0000)
committerivan <ivan>
Fri, 15 Apr 2005 13:15:34 +0000 (13:15 +0000)
Changes
DBSchema.pm
DBSchema/DBD/mysql.pm

diff --git a/Changes b/Changes
index 4160b52..ac741d0 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Perl extension DBIx::DBSchema.
 
+0.27 unreleased
+       - MySQL patch for enum types from Andy Orr <aorr76@gmail.com>
+
 0.26 Thu Apr  7 01:09:53 PDT 2005
        - ask for "public" db schema only from Pg
 
index 590cb9c..f15c2fa 100644 (file)
@@ -14,7 +14,7 @@ use DBIx::DBSchema::ColGroup::Index;
 #@ISA = qw(Exporter);
 @ISA = ();
 
-$VERSION = "0.26";
+$VERSION = "0.27";
 
 =head1 NAME
 
index f3804dd..7647b0f 100644 (file)
@@ -4,7 +4,7 @@ use strict;
 use vars qw($VERSION @ISA %typemap);
 use DBIx::DBSchema::DBD;
 
-$VERSION = '0.03';
+$VERSION = '0.04';
 @ISA = qw(DBIx::DBSchema::DBD);
 
 %typemap = (
@@ -37,7 +37,7 @@ sub columns {
   my $sth = $dbh->prepare("SHOW COLUMNS FROM $table") or die $dbh->errstr;
   $sth->execute or die $sth->errstr;
   map {
-    $_->{'Type'} =~ /^(\w+)\(?([\d\,]+)?\)?( unsigned)?$/
+    $_->{'Type'} =~ /^(\w+)\(?(.+)?\)?( unsigned)?$/
       or die "Illegal type: ". $_->{'Type'}. "\n";
     my($type, $length) = ($1, $2);
     [