From: Ash Berlin Date: Tue, 1 Apr 2008 14:09:33 +0000 (+0000) Subject: Fix suprious diff on cols with charsets/collates (MySQL) X-Git-Tag: v0.11008~329 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=2c6be67ad8870e978c1976c1debc6a0c4596d911;p=dbsrgits%2FSQL-Translator.git Fix suprious diff on cols with charsets/collates (MySQL) --- diff --git a/lib/SQL/Translator/Producer/MySQL.pm b/lib/SQL/Translator/Producer/MySQL.pm index a57bd9c..e3cbd3f 100644 --- a/lib/SQL/Translator/Producer/MySQL.pm +++ b/lib/SQL/Translator/Producer/MySQL.pm @@ -222,7 +222,13 @@ sub preprocess_schema { } } # foreach constraints + my %map = ( mysql_collate => 'collate', mysql_charset => 'character set'); foreach my $f ( $table->get_fields ) { + my $extra = $f->extra; + for (keys %map) { + $extra->{$map{$_}} = delete $extra->{$_} if exists $extra->{$_}; + } + my @size = $f->size; if ( !$size[0] && $f->data_type =~ /char$/ ) { $f->size( (255) );