Detect legact mysql versions and use separate ddl for them