常规建表语句:
CREATE TABLE `test_table` (
`id` int(11) NOT NULL,
`name` char(64) NOT NULL,
`password` char(64) NOT NULL,
PRIMARY KEY (`name`,`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='test';
解析脚本代码:
# coding:utf-8
import re
def table_design_transfer(table_design):
type_map = {"varchar":"String","datetime":"DateTime","bigint":"BigInteger","smallint":"SmallInteger","tinyint":"SmallInteger","text":"Text","int":"Integer","double":"Float","char":"String","set":"En