mirror of
https://github.com/go-gitea/gitea.git
synced 2026-08-05 14:46:19 +00:00
refactor: use WithRepo instead of WithDir for most git operations, clean up model migrations (#38555)
by the way, remove some unnecessary "models" imports from model migration package, fix migration test model init bug (modelmigration/migrationtest/tests.go)
This commit is contained in:
@@ -116,6 +116,10 @@ func RegisterModel(bean any, initFunc ...func() error) {
|
||||
}
|
||||
}
|
||||
|
||||
func ResetModels() {
|
||||
registeredModels, registeredInitFuncs = nil, nil
|
||||
}
|
||||
|
||||
// SyncAllTables sync the schemas of all tables, is required by unit test code
|
||||
func SyncAllTables() error {
|
||||
_, err := xormEngine.StoreEngine("InnoDB").SyncWithOptions(xorm.SyncOptions{
|
||||
|
||||
Reference in New Issue
Block a user