1、字段类型
Integer int整型,普通整数,一般是32位
SmallInteger int 取值范围最小的整型,一般是16位
Big Integer int或long 不限制精度的整数
Float float浮点型
String str 不定长字符串类型
Text str文本 变长字符串,对较大或不限长度的字符串做了优化
Unicode unicode变长unicode字符串
#unicode采用双字节对字节进行编码
unicode Text unicode 变长Unicode字符串,对较长或不限长度的字符串做了优化
Boolean bool布尔值
Date datatime.date日期
Time datetime.time时间类型时分秒
DateTime datetime.datetme时间类型,年月日时分秒
Interval datetime.timedelta时间间隔
Enum str一组字符串
PickleType 任何Python对象自动使用Pickle序列化
LargeBinary str二进制文件
2、字段常用的参数
primary_key 主键
Unique不重复,唯一
Index 索引
Nullable如果为True是可以为空
Default默认值
Autoincrement自增长