mirror of
https://github.com/lejianwen/rustdesk-api.git
synced 2026-02-11 16:51:07 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
654c764019 | ||
|
|
7101139250 | ||
|
|
793614841a |
@@ -101,7 +101,7 @@ func main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func DatabaseAutoUpdate() {
|
func DatabaseAutoUpdate() {
|
||||||
version := 245
|
version := 246
|
||||||
|
|
||||||
db := global.DB
|
db := global.DB
|
||||||
|
|
||||||
@@ -150,7 +150,7 @@ func DatabaseAutoUpdate() {
|
|||||||
if v.Version < 245 {
|
if v.Version < 245 {
|
||||||
//oauths 表的 oauth_type 字段设置为 op同样的值
|
//oauths 表的 oauth_type 字段设置为 op同样的值
|
||||||
db.Exec("update oauths set oauth_type = op")
|
db.Exec("update oauths set oauth_type = op")
|
||||||
db.Exec("update oauths set issuer = 'https://accounts.google.com' where op = 'google' and issuer = ''")
|
db.Exec("update oauths set issuer = 'https://accounts.google.com' where op = 'google'")
|
||||||
db.Exec("update user_thirds set oauth_type = third_type, op = third_type")
|
db.Exec("update user_thirds set oauth_type = third_type, op = third_type")
|
||||||
//通过email迁移旧的google授权
|
//通过email迁移旧的google授权
|
||||||
uts := make([]model.UserThird, 0)
|
uts := make([]model.UserThird, 0)
|
||||||
@@ -161,6 +161,9 @@ func DatabaseAutoUpdate() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if v.Version < 246 {
|
||||||
|
db.Exec("update oauths set issuer = 'https://accounts.google.com' where op = 'google' and issuer is null")
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user