mirror of
https://github.com/veops/oneterm.git
synced 2025-10-16 12:21:06 +08:00
feat(api): share
This commit is contained in:
@@ -2,6 +2,7 @@ package mysql
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"strings"
|
||||
|
||||
"go.uber.org/zap"
|
||||
"gorm.io/driver/mysql"
|
||||
@@ -35,4 +36,8 @@ func init() {
|
||||
if err != nil {
|
||||
logger.L().Fatal("auto migrate mysql failed", zap.Error(err))
|
||||
}
|
||||
|
||||
if err = DB.Migrator().DropIndex(&model.Authorization{}, "asset_account_id_del"); err != nil && !strings.Contains(err.Error(), "1091") {
|
||||
logger.L().Fatal("drop index failed", zap.Error(err))
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user