fix migrate

This commit is contained in:
ljw
2024-11-05 21:03:05 +08:00
parent e71ea2243f
commit 943b1f8077

View File

@@ -150,7 +150,7 @@ func DatabaseAutoUpdate() {
if v.Version < 245 {
//oauths 表的 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")
//通过email迁移旧的google授权
uts := make([]model.UserThird, 0)