gorm.io/gorm
This commit is contained in:
@@ -12,8 +12,7 @@ import (
|
||||
"go_blog/pkg/util"
|
||||
"time"
|
||||
|
||||
"github.com/jinzhu/gorm"
|
||||
_ "github.com/jinzhu/gorm/dialects/mysql"
|
||||
"gorm.io/gorm"
|
||||
)
|
||||
|
||||
var DB *gorm.DB
|
||||
@@ -37,6 +36,7 @@ func SetUp(isOrmDebug bool) {
|
||||
}
|
||||
|
||||
DB.AutoMigrate(&Account{})
|
||||
DB.AutoMigrate(&Content{})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user