diff --git a/src/main/resources/update/gitbucket-core_4.0.xml b/src/main/resources/update/gitbucket-core_4.0.xml
index e22660f..70e7e02 100644
--- a/src/main/resources/update/gitbucket-core_4.0.xml
+++ b/src/main/resources/update/gitbucket-core_4.0.xml
@@ -60,13 +60,12 @@
-
+
-
@@ -74,7 +73,7 @@
-
+
@@ -84,7 +83,6 @@
-
@@ -108,7 +106,7 @@
-
+
@@ -119,14 +117,13 @@
-
-
+
@@ -139,7 +136,6 @@
-
@@ -218,7 +214,7 @@
-
+
@@ -226,7 +222,6 @@
-
diff --git a/src/main/scala/gitbucket/core/util/DatabaseConfig.scala b/src/main/scala/gitbucket/core/util/DatabaseConfig.scala
index 1401b8e..e80d3ef 100644
--- a/src/main/scala/gitbucket/core/util/DatabaseConfig.scala
+++ b/src/main/scala/gitbucket/core/util/DatabaseConfig.scala
@@ -7,7 +7,7 @@
import ConfigUtil._
import com.github.takezoe.slick.blocking.{BlockingH2Driver, BlockingJdbcProfile, BlockingMySQLDriver}
import liquibase.database.AbstractJdbcDatabase
-import liquibase.database.core.{H2Database, MySQLDatabase, PostgresDatabase}
+import liquibase.database.core.{H2Database, MariaDBDatabase, MySQLDatabase, PostgresDatabase}
import org.apache.commons.io.FileUtils
import scala.reflect.ClassTag
@@ -78,6 +78,8 @@
H2
} else if (url.startsWith("jdbc:mysql:")) {
MySQL
+ } else if (url.startsWith("jdbc:mariadb:")) {
+ MariaDb
} else if (url.startsWith("jdbc:postgresql:")) {
PostgreSQL
} else {
@@ -97,6 +99,12 @@
val liquiDriver = new MySQLDatabase()
}
+ object MariaDb extends DatabaseType {
+ val jdbcDriver = "org.mariadb.jdbc.Driver"
+ val slickDriver = BlockingMySQLDriver
+ val liquiDriver = new MariaDBDatabase()
+ }
+
object PostgreSQL extends DatabaseType {
val jdbcDriver = "org.postgresql.Driver2"
val slickDriver = BlockingPostgresDriver