From: Ivan Kohler Date: Wed, 29 Jan 2014 23:40:35 +0000 (-0800) Subject: no DEFAULT for mysql, patch from trs@bestpractical, CPAN#58505 X-Git-Url: http://git.freeside.biz/gitweb/?p=DBIx-DBSchema.git;a=commitdiff_plain;h=9bfaf8ed706999cb345c146817db0c005687b272 no DEFAULT for mysql, patch from trs@bestpractical, CPAN#58505 --- diff --git a/DBSchema/DBD/mysql.pm b/DBSchema/DBD/mysql.pm index c04a3d6..07d341a 100644 --- a/DBSchema/DBD/mysql.pm +++ b/DBSchema/DBD/mysql.pm @@ -139,6 +139,15 @@ sub column_callback { } + # MySQL no longer supports defaults for text/blob columns + if ( $column_obj->type =~ /(TEXT|BLOB)/i + and defined $column_obj->default ) { + + # There's no way to unset the default cleanly. + # An empty string isn't quite right. + $column_obj->{'default'} = undef; + } + $hashref; } diff --git a/MANIFEST b/MANIFEST index f2e6e95..8b4d99e 100644 --- a/MANIFEST +++ b/MANIFEST @@ -21,3 +21,4 @@ t/load-pg.t t/load-sqlite.t t/load-sybase.t t/load.t +t/mysql-text-default.t