mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	* Changed migration calling so that migrations can use models package
This commit is contained in:
		@@ -10,6 +10,7 @@ import (
 | 
			
		||||
 | 
			
		||||
	"code.gitea.io/git"
 | 
			
		||||
	"code.gitea.io/gitea/models"
 | 
			
		||||
	"code.gitea.io/gitea/models/migrations"
 | 
			
		||||
	"code.gitea.io/gitea/modules/cron"
 | 
			
		||||
	"code.gitea.io/gitea/modules/highlight"
 | 
			
		||||
	"code.gitea.io/gitea/modules/indexer"
 | 
			
		||||
@@ -50,7 +51,7 @@ func GlobalInit() {
 | 
			
		||||
	if setting.InstallLock {
 | 
			
		||||
		highlight.NewContext()
 | 
			
		||||
		markdown.NewSanitizer()
 | 
			
		||||
		if err := models.NewEngine(); err != nil {
 | 
			
		||||
		if err := models.NewEngine(migrations.Migrate); err != nil {
 | 
			
		||||
			log.Fatal(4, "Failed to initialize ORM engine: %v", err)
 | 
			
		||||
		}
 | 
			
		||||
		models.HasEngine = true
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user