fix: 迁移顺序修复
This commit is contained in:
@@ -103,11 +103,11 @@ func (a *App) Start() error {
|
||||
|
||||
// 数据库迁移
|
||||
if err := a.db.AutoMigrate(
|
||||
&models.RequestLog{},
|
||||
&models.GroupHourlyStat{},
|
||||
&models.APIKey{},
|
||||
&models.SystemSetting{},
|
||||
&models.Group{},
|
||||
&models.APIKey{},
|
||||
&models.RequestLog{},
|
||||
&models.GroupHourlyStat{},
|
||||
); err != nil {
|
||||
return fmt.Errorf("database auto-migration failed: %w", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user