CreateDatabase -> OpenDatabase refactor.
This commit is contained in:
parent
bc243d4ef2
commit
0e6f640554
2 changed files with 2 additions and 2 deletions
|
|
@ -28,7 +28,7 @@ func initInstaller(fs vfs.VFS, settings *settings.Settings) (*installer, error)
|
|||
|
||||
func (inst *installer) DoInstall(ctx context.Context, cmd *cli.Command) error {
|
||||
fmt.Println(inst.settings)
|
||||
db := models.CreateDatabase(inst.settings)
|
||||
db := models.OpenDatabase(inst.settings)
|
||||
fmt.Println(inst.settings.System.DSN)
|
||||
err := db.Migrate(inst.fs)
|
||||
if err != nil {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ func (m *verse) AddVerse(ctx context.Context, cmd *cli.Command) error {
|
|||
return err
|
||||
}
|
||||
|
||||
mdb := models.CreateDatabase(m.settings)
|
||||
mdb := models.OpenDatabase(m.settings)
|
||||
if err := mdb.Open(); err != nil {
|
||||
logger.Error("connection error:", errors.Unfurl(err))
|
||||
return err
|
||||
|
|
|
|||
Loading…
Reference in a new issue