Description:
When trying to import an SQL database creation script that contains type synonyms such as SERIAL or BOOLEAN, I get a warning. If I change the synonym for it's expanded definition, ie:
SERIAL -> BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE
BOOLEAN _> TINYINT(1)
Then the import works.
Please support importing schemas that use these synonyms, as it makes them far terser to read. Similarly, please support the exporting of these synonymns, rather than expanding the synonym - maybe an export option which attempts to generate synonyms where possible could be added.
How to repeat:
Try to import this:
===================
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';
CREATE TABLE IF NOT EXISTS `mydb`.`mytable` (
`id` SERIAL);
SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
And you get this warning:
=========================
Started parsing MySQL SQL script.
WARNING: Mapping failed for datatype `SERIAL`
Created MySQL Table: mydb.mytable
Finished parsing MySQL SQL script. Totally processed statements: successful (1), errors (0), warnings (1).