sub convert_schema { my ($name,$schema,$engine) = @_; my $schema2 = ''; my @lines = split "\n",$schema; for (@lines) { # CHANGES FOR ALL TABLES s#[\[\]]##g; # Remove brackets s/\)\n/\);\n/; # Add semicolon to end of table statement s/char \(/char(/; # Remove space between varchar and ( s/ ,/,/g; # Remove space before comma s/ varchar\(\d+\)/ text/ if (m/varchar\((\d+)\)/) and ($1 > 255); # Use "text" instead of "varchar(n)" if n > 255 s/\)$/\);/; s/ smalldatetime/ varchar(32)/g; # Trouble w/dbSNP dates, like "2000-08-25 17:02:00.0" - the .0 at the end. s/ datetime/ varchar(32)/g; s/ real/ float/g; s/ bit/ boolean/g;