mirror of
https://gitee.com/dromara/mayfly-go
synced 2026-01-03 21:26:35 +08:00
feat: 数据库迁移至文件支持文件保存天数等
This commit is contained in:
@@ -89,7 +89,7 @@ func (sd *SqliteMetaData) GetTables(tableNames ...string) ([]dbi.Table, error) {
|
||||
func (sd *SqliteMetaData) getDataTypes(dataType string) (string, string, string) {
|
||||
matches := dataTypeRegexp.FindStringSubmatch(dataType)
|
||||
if len(matches) == 0 {
|
||||
return "", "", ""
|
||||
return dataType, "", ""
|
||||
}
|
||||
return matches[1], matches[2], matches[3]
|
||||
}
|
||||
@@ -133,7 +133,7 @@ func (sd *SqliteMetaData) GetColumns(tableNames ...string) ([]dbi.Column, error)
|
||||
} else {
|
||||
column.CharMaxLength = cast.ToInt(length)
|
||||
}
|
||||
column.DataType = dbi.ColumnDataType(dataType)
|
||||
column.DataType = dbi.ColumnDataType(strings.ToLower(dataType))
|
||||
columnHelper.FixColumn(&column)
|
||||
|
||||
columns = append(columns, column)
|
||||
|
||||
Reference in New Issue
Block a user