mirror of
				https://github.com/go-gitea/gitea
				synced 2025-10-30 10:58:27 +00:00 
			
		
		
		
	Add migration
This commit is contained in:
		| @@ -584,6 +584,8 @@ var migrations = []Migration{ | ||||
| 	NewMigration("Add missing field of commit status summary table", v1_23.AddCommitStatusSummary2), | ||||
| 	// v297 -> v298 | ||||
| 	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 | ||||
|   | ||||
| @@ -10,6 +10,7 @@ import ( | ||||
| // AddConfidentialColumnToOAuth2ApplicationTable: add ConfidentialClient column, setting existing rows to true | ||||
| func AddConfidentialClientColumnToOAuth2ApplicationTable(x *xorm.Engine) error { | ||||
| 	type OAuth2Application struct { | ||||
| 		ID                 int64 | ||||
| 		ConfidentialClient bool `xorm:"NOT NULL DEFAULT TRUE"` | ||||
| 	} | ||||
|  | ||||
|   | ||||
							
								
								
									
										10
									
								
								models/migrations/v1_23/v298.go
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										10
									
								
								models/migrations/v1_23/v298.go
									
									
									
									
									
										Normal file
									
								
							| @@ -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") | ||||
| } | ||||
		Reference in New Issue
	
	Block a user