feat: sync deployed v1.0.0-rc.38-custom.42
Sync production source including routing, billing, Astra detection and public uptime. Update custom build instructions and license packaging.
This commit is contained in:
1 parent
aa6c3f50f4
commit
ceddfd3d6b
828 files changed
+122253
-13702
No files matched your search
@@ -220,6 +220,19 @@ func InitDB() (err error) {
|
||||
}
|
||||
common.SysLog("database migration started")
|
||||
err = migrateDB()
|
||||
if err == nil {
|
||||
err = MigrateTokenAstraAutoSwitch()
|
||||
}
|
||||
if err == nil {
|
||||
err = MigrateTokenAstraDetection()
|
||||
}
|
||||
if err == nil {
|
||||
var count int
|
||||
count, err = MigrateTokenRoutingPolicies()
|
||||
if err == nil {
|
||||
common.SysLog(fmt.Sprintf("token routing migration: %d tokens", count))
|
||||
}
|
||||
}
|
||||
return err
|
||||
} else {
|
||||
common.FatalLog(err)
|
||||
@@ -330,10 +343,14 @@ func migrateDB() error {
|
||||
if err := migrateTokenModelLimitsToText(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := migrateOptionPrimaryKey(DB); err != nil {
|
||||
common.SysError("failed to migrate options primary key: " + err.Error())
|
||||
}
|
||||
|
||||
err := DB.AutoMigrate(
|
||||
&Channel{},
|
||||
&Token{},
|
||||
&RelayAttempt{},
|
||||
&User{},
|
||||
&UserSession{},
|
||||
&AuthFlow{},
|
||||
@@ -365,6 +382,9 @@ func migrateDB() error {
|
||||
&SystemInstance{},
|
||||
&SystemTask{},
|
||||
&SystemTaskLock{},
|
||||
&DetectionRun{},
|
||||
&DetectionCall{},
|
||||
&DetectionSchedule{},
|
||||
&CasbinRule{},
|
||||
&AuthzRole{},
|
||||
)
|
||||
|
||||
Reference in new issue
Block a user