A:数据库初始化,并增加User表示例
This commit is contained in:
1 parent
da2222f2d9
commit
b8dc199cff
15 files changed
+1459
-108
No files matched your search
@@ -0,0 +1,12 @@
|
||||
package db
|
||||
|
||||
import (
|
||||
"rear/internal/model"
|
||||
)
|
||||
|
||||
func AutoMigrate() error {
|
||||
return DB.AutoMigrate(
|
||||
&model.User{},
|
||||
// 在这里添加其他模型
|
||||
)
|
||||
}
|
||||
Reference in new issue
Block a user