mirror of
https://github.com/thomiceli/opengist.git
synced 2025-07-08 17:08:04 +02:00
Add Postgres and MySQL databases support (#335)
This commit is contained in:
@ -8,7 +8,6 @@ import (
|
||||
"github.com/urfave/cli/v2"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
)
|
||||
|
||||
var CmdHook = cli.Command{
|
||||
@ -50,7 +49,8 @@ func initialize(ctx *cli.Context) {
|
||||
}
|
||||
config.InitLog()
|
||||
|
||||
if err := db.Setup(filepath.Join(config.GetHomeDir(), config.C.DBFilename), false); err != nil {
|
||||
db.DeprecationDBFilename()
|
||||
if err := db.Setup(config.C.DBUri, false); err != nil {
|
||||
log.Fatal().Err(err).Msg("Failed to initialize database in hooks")
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user