mirror of https://github.com/go-gitea/gitea.git
Add migration
This commit is contained in:
parent
a5187260bf
commit
f8d57dcfa0
|
@ -584,6 +584,8 @@ var migrations = []Migration{
|
||||||
NewMigration("Add missing field of commit status summary table", v1_23.AddCommitStatusSummary2),
|
NewMigration("Add missing field of commit status summary table", v1_23.AddCommitStatusSummary2),
|
||||||
// v297 -> v298
|
// v297 -> v298
|
||||||
NewMigration("Add everyone_access_mode for repo_unit", v1_23.AddRepoUnitEveryoneAccessMode),
|
NewMigration("Add everyone_access_mode for repo_unit", v1_23.AddRepoUnitEveryoneAccessMode),
|
||||||
|
// v298 -> v299
|
||||||
|
NewMigration("Drop wrongly created table o_auth2_application", v1_23.DropWronglyCreatedTable),
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetCurrentDBVersion returns the current db version
|
// GetCurrentDBVersion returns the current db version
|
||||||
|
|
|
@ -10,6 +10,7 @@ import (
|
||||||
// AddConfidentialColumnToOAuth2ApplicationTable: add ConfidentialClient column, setting existing rows to true
|
// AddConfidentialColumnToOAuth2ApplicationTable: add ConfidentialClient column, setting existing rows to true
|
||||||
func AddConfidentialClientColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
|
func AddConfidentialClientColumnToOAuth2ApplicationTable(x *xorm.Engine) error {
|
||||||
type OAuth2Application struct {
|
type OAuth2Application struct {
|
||||||
|
ID int64
|
||||||
ConfidentialClient bool `xorm:"NOT NULL DEFAULT TRUE"`
|
ConfidentialClient bool `xorm:"NOT NULL DEFAULT TRUE"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,10 @@
|
||||||
|
// Copyright 2024 The Gitea Authors. All rights reserved.
|
||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
package v1_23 //nolint
|
||||||
|
|
||||||
|
import "xorm.io/xorm"
|
||||||
|
|
||||||
|
func DropWronglyCreatedTable(x *xorm.Engine) error {
|
||||||
|
return x.DropTables("o_auth2_application")
|
||||||
|
}
|
Loading…
Reference in New Issue