mirror of
https://github.com/tangpanqing/aorm.git
synced 2025-10-06 00:16:50 +08:00
support sqlite3
This commit is contained in:
@@ -187,6 +187,10 @@ func (mm *MigrateExecutor) getColumnsFromDb(dbName string, tableName string) []C
|
||||
if columnsFromDb[j].DataType.String == "double precision" {
|
||||
columnsFromDb[j].DataType = null.StringFrom("float")
|
||||
}
|
||||
|
||||
if columnsFromDb[j].DataType.String == "timestamp without time zone" {
|
||||
columnsFromDb[j].DataType = null.StringFrom("timestamp")
|
||||
}
|
||||
}
|
||||
|
||||
return columnsFromDb
|
||||
@@ -465,6 +469,7 @@ func getDataType(fieldType string, fieldMap map[string]string) string {
|
||||
}
|
||||
if "Time" == fieldType {
|
||||
DataType = "date"
|
||||
DataType = "timestamp"
|
||||
}
|
||||
if "Float" == fieldType {
|
||||
DataType = "float"
|
||||
|
Reference in New Issue
Block a user