beeper / chatwoot

Matrix-Chatwoot mirroring bot
Apache License 2.0
15 stars 3 forks source link

Database initialization #55

Open shcorya opened 1 month ago

shcorya commented 1 month ago

Running the docker container from ghcr.io successfully creates the config file. Upon running the container a second time, starting with a fresh Postgres database, the following error is thrown.

goroutine 1 [running]:
go.mau.fi/util/dbutil.(*UpgradeTable).Register(0xf8d480, 0x15?, 0xc000105018?, 0x28?, {0xc0002aa880?, 0xb1a1ea?}, 0x30?, 0xb49138?)
      /go/pkg/mod/go.mau.fi/util@v0.4.1/dbutil/upgradetable.go:50 +0x34e
go.mau.fi/util/dbutil.(*UpgradeTable).RegisterFSPath(0xb09d84?, {0xc21f00, 0xc25500}, {0xc17f18, 0x1})
      /go/pkg/mod/go.mau.fi/util@v0.4.1/dbutil/upgradetable.go:281 +0x39b
go.mau.fi/util/dbutil.(*UpgradeTable).RegisterFS(...)
      /go/pkg/mod/go.mau.fi/util@v0.4.1/dbutil/upgradetable.go:259
github.com/beeper/chatwoot/database.init.0()
      /build/database/statestore.go:15 +0x3a
panic: tried to override upgrade at 0 ('Latest revision') with 'Initial tables'
shcorya commented 1 month ago

Running the older version ghcr.io/beeper/chatwoot:39c97f07b06cd6e24547851ba2fe6959ad9472b8 initializes the database, but throws this error:

2024-08-17T03:10:07Z FTL Failed to initialize crypto helper error="failed to load olm account: ERROR: column \"key_backup_version\" does not exist (SQLSTATE 42703)"