2022-10-24 09:59:24 +02:00
|
|
|
// Copyright 2022 The Gitea Authors. All rights reserved.
|
2022-11-27 13:20:29 -05:00
|
|
|
// SPDX-License-Identifier: MIT
|
2022-10-24 09:59:24 +02:00
|
|
|
|
2025-06-27 07:59:55 +02:00
|
|
|
package v1_18
|
2022-10-24 09:59:24 +02:00
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"xorm.io/xorm"
|
|
|
|
|
)
|
|
|
|
|
|
2022-11-02 16:54:36 +08:00
|
|
|
// AddConfidentialColumnToOAuth2ApplicationTable: add ConfidentialClient column, setting existing rows to true
|
|
|
|
|
func AddConfidentialClientColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
|
2024-04-23 11:00:57 +08:00
|
|
|
type oauth2Application struct {
|
|
|
|
|
ID int64
|
2022-10-24 09:59:24 +02:00
|
|
|
ConfidentialClient bool `xorm:"NOT NULL DEFAULT TRUE"`
|
|
|
|
|
}
|
2024-04-23 11:00:57 +08:00
|
|
|
return x.Sync(new(oauth2Application))
|
2022-10-24 09:59:24 +02:00
|
|
|
}
|