File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -6034,14 +6034,19 @@ sub mysql_tables {
60346034 infoprint " Current Fieldtype: $current_type " ;
60356035 # infoprint " Optimal Fieldtype: Not available";
60366036 }
6037- elsif ( $current_type ne $optimal_type ) {
6037+ elsif ( $current_type ne $optimal_type and $current_type !~ / .*DATETIME.* / and $current_type !~ / .*TIMESTAMP.* / ) {
60386038 infoprint " Current Fieldtype: $current_type " ;
6039- infoprint " Optimal Fieldtype: $optimal_type " ;
6040- badprint
6039+ if ($optimal_type =~ / .*ENUM\( .*/ ) {
6040+ $optimal_type =" ENUM( ... )" ;
6041+ }
6042+ infoprint " Optimal Fieldtype: $optimal_type " ;
6043+ if ($optimal_type !~ / .*ENUM\( .*/ ) {
6044+ badprint
60416045" Consider changing type for column $_ in table $dbname .$tbname " ;
60426046 push ( @generalrec ,
60436047" ALTER TABLE \` $dbname \` .\` $tbname \` MODIFY \` $_ \` $optimal_type ;"
60446048 );
6049+ }
60456050
60466051 }
60476052 else {
You can’t perform that action at this time.
0 commit comments