Bugfix for new installation

This commit is contained in:
Naoki Takezoe
2016-07-04 08:33:02 +09:00
parent 29e632af04
commit fe1e18b495

View File

@@ -72,6 +72,11 @@ class InitializeListener extends ServletContextListener with SystemSettingsServi
}
}
// Run normal migration
logger.info("Start schema update")
val solidbase = new Solidbase()
solidbase.migrate(conn, Thread.currentThread.getContextClassLoader, DatabaseConfig.liquiDriver, GitBucketCoreModule)
// Rescue code for users who updated from 3.14 to 4.0.0
// https://github.com/gitbucket/gitbucket/issues/1227
val currentVersion = manager.getCurrentVersion(GitBucketCoreModule.getModuleId)
@@ -79,11 +84,6 @@ class InitializeListener extends ServletContextListener with SystemSettingsServi
manager.updateVersion(GitBucketCoreModule.getModuleId, "4.0.0")
}
// Run normal migration
logger.info("Start schema update")
val solidbase = new Solidbase()
solidbase.migrate(conn, Thread.currentThread.getContextClassLoader, DatabaseConfig.liquiDriver, GitBucketCoreModule)
// Load plugins
logger.info("Initialize plugins")
PluginRegistry.initialize(event.getServletContext, loadSystemSettings(), conn)