支持sqlite表结构自动生成
This commit is contained in:
@ -115,6 +115,9 @@ func (f *Field) ToString() (string, error) {
|
||||
return "", err
|
||||
}
|
||||
fieldTpl := f.getFieldTpl()
|
||||
if f.PrimaryKey && DatabaseDriver == consts.DatabaseDriverSqlite3 {
|
||||
f.Type = "INTEGER PRIMARY KEY AUTOINCREMENT"
|
||||
}
|
||||
dataReplaceTable := map[string]string{
|
||||
FieldName: f.Name, // 字段名
|
||||
FieldType: f.Type, // 字段类型
|
||||
|
Reference in New Issue
Block a user