- mysql: TEXT->LONGTEXT
- mysql: when reverse engineering, transform a default of
CURRENT_TIMESTAMP into the more common NOW()
+ - mysql: fix reverse-engineering of empty string default
0.38 Thu Jan 14 15:26:13 PST 2010
- Bump version number for ->quoted_default availability & default
my($type, $length) = ($1, $2);
my $default = $_->{'Default'};
- $default = '' unless defined($default);
- $default = \0 if $default eq '0';
- $default = \'NOW()' if uc($default) eq 'CURRENT_TIMESTAMP';
+ if ( defined($default) ) {
+ $default = \"''" if $default eq '';
+ $default = \0 if $default eq '0';
+ $default = \'NOW()' if uc($default) eq 'CURRENT_TIMESTAMP';
+ } else {
+ $default = '';
+ }
[
$_->{'Field'},