构建数据库迁移体系

This commit is contained in:
linwenxiang
2020-09-04 14:30:52 +08:00
parent 8a3ee2e7af
commit 77dfe418df
6 changed files with 241 additions and 10 deletions
+12
View File
@@ -0,0 +1,12 @@
package models
import "time"
type Migration struct {
Version string `gorm:"primary_key"`
ApplyTime time.Time `gorm:"autoCreateTime"`
}
func (Migration) TableName() string {
return "sys_migration"
}