fix db
This commit is contained in:
@@ -39,7 +39,7 @@ func NewDatabase(driver string, dsn []string, options *types.SqlOptions) (db *go
|
||||
}
|
||||
|
||||
// 自动迁移表结构
|
||||
if len(MigrateTables) > 0 {
|
||||
if len(MigrateTables) > 0 && options.IsAutoMigrate {
|
||||
err = db.AutoMigrate(MigrateTables...)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user