From: ivan Date: Fri, 15 Apr 2005 13:15:34 +0000 (+0000) Subject: MySQL patch for enum types from Andy Orr X-Git-Tag: DBIx_DBSchema_0_27~1 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=dae6c03e898bbcb2f5c0f2bac919b8c444d94ff1;p=DBIx-DBSchema.git MySQL patch for enum types from Andy Orr --- diff --git a/Changes b/Changes index 4160b52..ac741d0 100644 --- 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 + 0.26 Thu Apr 7 01:09:53 PDT 2005 - ask for "public" db schema only from Pg diff --git a/DBSchema.pm b/DBSchema.pm index 590cb9c..f15c2fa 100644 --- a/DBSchema.pm +++ b/DBSchema.pm @@ -14,7 +14,7 @@ use DBIx::DBSchema::ColGroup::Index; #@ISA = qw(Exporter); @ISA = (); -$VERSION = "0.26"; +$VERSION = "0.27"; =head1 NAME diff --git a/DBSchema/DBD/mysql.pm b/DBSchema/DBD/mysql.pm index f3804dd..7647b0f 100644 --- a/DBSchema/DBD/mysql.pm +++ b/DBSchema/DBD/mysql.pm @@ -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); [