3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00
This commit is contained in:
Shivaram Lingamneni 2020-02-21 04:24:18 -05:00
parent 0d5a4fd584
commit 829481ab40

View File

@ -156,6 +156,12 @@ func performAutoUpgrade(currentVersion string, config *Config) (err error) {
// UpgradeDB upgrades the datastore to the latest schema.
func UpgradeDB(config *Config) (err error) {
// #715: test that the database exists
_, err = os.Stat(config.Datastore.Path)
if err != nil {
return err
}
store, err := buntdb.Open(config.Datastore.Path)
if err != nil {
return err