mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-09-05 22:25:49 +08:00
fix: Modify OneDrive default connection settings (#9440)
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after 9s
Some checks failed
SonarCloud Scan / SonarCloud (push) Failing after 9s
This commit is contained in:
parent
03fac3ec06
commit
b1adc37920
2 changed files with 18 additions and 0 deletions
|
@ -110,6 +110,7 @@ func Init() {
|
|||
migrations.AddMcpServer,
|
||||
migrations.AddPbootCMSPHPExtensions,
|
||||
migrations.DeleteV2Openresty,
|
||||
migrations.UpdateOnedrive,
|
||||
})
|
||||
if err := m.Migrate(); err != nil {
|
||||
global.LOG.Error(err)
|
||||
|
|
|
@ -492,3 +492,20 @@ var DeleteV2Openresty = &gormigrate.Migration{
|
|||
return tx.Delete(&model.AppDetail{}).Where("version = '1.27.1.2-0-1-focal'").Error
|
||||
},
|
||||
}
|
||||
|
||||
var UpdateOnedrive = &gormigrate.Migration{
|
||||
ID: "20250704-update-onedrive",
|
||||
Migrate: func(tx *gorm.DB) error {
|
||||
if err := tx.Model(&model.Setting{}).
|
||||
Where("key = ?", "OneDriveID").
|
||||
Update("value", "NTQ0NmNmZTMtNGM3OS00N2EwLWFlMjUtZmM2NDU0NzhlMmQ5").Error; err != nil {
|
||||
return err
|
||||
}
|
||||
if err := tx.Model(&model.Setting{}).
|
||||
Where("key = ?", "OneDriveSc").
|
||||
Update("value", "bGRlOFF+WEVrR1M0b25Vb1VsRWpMYzE2MW9rTXZEM25KdnZ1MGN6MA==").Error; err != nil {
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue