From: ivan Date: Thu, 28 Jun 2007 02:14:44 +0000 (+0000) Subject: DBSchema::DBD::mysql reverse-engineering patch from Brian Phillips, closes: CPAN... X-Git-Tag: DBIx_DBSchema_0_33~6 X-Git-Url: http://git.freeside.biz/gitweb/?p=DBIx-DBSchema.git;a=commitdiff_plain;h=d4da48fc6a3041859215c7e51a946d645f01bed4 DBSchema::DBD::mysql reverse-engineering patch from Brian Phillips, closes: CPAN#17582, thanks! --- diff --git a/DBSchema/DBD/mysql.pm b/DBSchema/DBD/mysql.pm index 7647b0f..ef7bb59 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.04'; +$VERSION = '0.05'; @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+)\(?(.+)?\)?( unsigned)?$/ + $_->{'Type'} =~ /^(\w+)\(?([^)]+)?\)?( unsigned)?$/ or die "Illegal type: ". $_->{'Type'}. "\n"; my($type, $length) = ($1, $2); [