|
|
@@ -8,13 +8,11 @@ import (
|
|
|
"time"
|
|
|
)
|
|
|
|
|
|
-var tableModelDescribe = client.TableModelDescribe{
|
|
|
- Fields: []client.TableModelField{
|
|
|
- {"ID", "gorm:\"primary_key;type:varchar(32);comment:id;\""},
|
|
|
- {"Name", "gorm:\"not null;type:varchar(128);comment:数据库名称;\""},
|
|
|
- {"Time", "gorm:\"not null;type:timestamp with time zone;comment:数据库时间;\""},
|
|
|
- {"TableNum", "gorm:\"not null;type:integer;comment:数据库表数量;\""},
|
|
|
- },
|
|
|
+var tableModelDescribe = map[string]string{
|
|
|
+ "ID": "gorm:\"primary_key;type:varchar(32);comment:id;\"",
|
|
|
+ "Name": "gorm:\"not null;type:varchar(128);comment:数据库名称;\"",
|
|
|
+ "Time": "gorm:\"not null;type:timestamp with time zone;comment:数据库时间;\"",
|
|
|
+ "TableNum": "gorm:\"not null;type:integer;comment:数据库表数量;\"",
|
|
|
}
|
|
|
|
|
|
func TestAutoMigrate(t *testing.T) {
|