mirror of
https://github.com/gitbucket/gitbucket.git
synced 2025-11-07 14:05:52 +01:00
(refs #18)Add schema update to fix constraints for COLLABORATOR.
This commit is contained in:
@@ -14,7 +14,7 @@ object AutoUpdate {
|
||||
* Version of GitBucket
|
||||
*
|
||||
* @param majorVersion the major version
|
||||
* @param minorVersion the minor version
|
||||
* @param minorVersion the minor version
|
||||
*/
|
||||
case class Version(majorVersion: Int, minorVersion: Int){
|
||||
|
||||
@@ -22,7 +22,7 @@ object AutoUpdate {
|
||||
|
||||
/**
|
||||
* Execute update/MAJOR_MINOR.sql to update schema to this version.
|
||||
* If corresponding SQL file does not exist, this method do nothing.
|
||||
* If corresponding SQL file does not exist, this method do nothing.
|
||||
*/
|
||||
def update(conn: Connection): Unit = {
|
||||
val sqlPath = "update/%d_%d.sql".format(majorVersion, minorVersion)
|
||||
@@ -40,7 +40,7 @@ object AutoUpdate {
|
||||
}
|
||||
|
||||
/**
|
||||
* MAJOR.MINOR
|
||||
* MAJOR.MINOR
|
||||
*/
|
||||
val versionString = "%d.%d".format(majorVersion, minorVersion)
|
||||
}
|
||||
@@ -49,6 +49,7 @@ object AutoUpdate {
|
||||
* The history of versions. A head of this sequence is the current BitBucket version.
|
||||
*/
|
||||
val versions = Seq(
|
||||
Version(1, 1),
|
||||
Version(1, 0)
|
||||
)
|
||||
|
||||
@@ -84,7 +85,7 @@ object AutoUpdate {
|
||||
}
|
||||
|
||||
/**
|
||||
* Start H2 database and update schema automatically.
|
||||
* Start H2 database and update schema automatically.
|
||||
*/
|
||||
class AutoUpdateListener extends org.h2.server.web.DbStarter {
|
||||
import AutoUpdate._
|
||||
|
||||
Reference in New Issue
Block a user