mirror of
https://github.com/documize/community.git
synced 2025-07-19 13:19:43 +02:00
Make database boot process storage provider agonistic
Moved database queries into provider specific object to ensure database checking, installation, upgrade procedures are pluggable.
This commit is contained in:
parent
4c733ce581
commit
97d90662dd
9 changed files with 524 additions and 466 deletions
|
@ -13,9 +13,9 @@ package database
|
|||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/documize/community/core/env"
|
||||
"sort"
|
||||
|
||||
"github.com/documize/community/core/env"
|
||||
"github.com/documize/community/server/web"
|
||||
)
|
||||
|
||||
|
@ -47,7 +47,7 @@ func LoadScripts() (s Scripts, err error) {
|
|||
|
||||
// SpecificScripts returns SQL scripts for current databasse provider.
|
||||
func SpecificScripts(runtime *env.Runtime, all Scripts) (s []Script) {
|
||||
switch runtime.Storage.Type {
|
||||
switch runtime.StoreProvider.Type() {
|
||||
case env.StoreTypeMySQL, env.StoreTypeMariaDB, env.StoreTypePercona:
|
||||
return all.MySQLScripts
|
||||
case env.StoreTypePostgreSQL:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue