feat(api): share

This commit is contained in:
ttk
2024-09-19 18:51:33 +08:00
parent 5a213b1686
commit 7ee8b58f5f
17 changed files with 638 additions and 164 deletions

View File

@@ -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))
}
}