mautrix / signal

A Matrix-Signal puppeting bridge
GNU Affero General Public License v3.0
499 stars 75 forks source link

Failed to initialize database when upgrading from python v4.0.3 to go v0.5.0 version with SQLite #454

Closed KsmoinO closed 7 months ago

KsmoinO commented 7 months ago

Hello, I just download mautrix-signal-amd64 latest release from github assets and run it in place but the upgrade fails with the following errors:

2024-02-16T19:24:43+01:00 INF Initializing bridge built_at="Feb 16 2024, 16:20:55" go_version=go1.22.0 name=mautrix-signal version=0.5.0
2024-02-16T19:24:43+01:00 DBG Initializing database connection
2024-02-16T19:24:43+01:00 WRN Using SQLite without _txlock=immediate is not recommended fixed_uri_example=file:mautrix-signal.db?_txlock=immediate
2024-02-16T19:24:43+01:00 DBG Initializing state store
2024-02-16T19:24:43+01:00 DBG Initializing Matrix event processor
2024-02-16T19:24:43+01:00 DBG Initializing Matrix event handler
2024-02-16T19:24:43+01:00 INF Initializing libsignal version:0.39.2 component=libsignal file=rust/bridge/ffi/src/logging.rs line=99 target=signal_ffi::logging
2024-02-16T19:24:43+01:00 INF Bridge initialization complete, starting...
2024-02-16T19:24:43+01:00 DBG Running database upgrades
2024-02-16T19:24:43+01:00 INF Preparing to update database schema current_version=12 db_section=main latest_known_version=19 oldest_compatible_version=12
2024-02-16T19:24:43+01:00 INF Upgrading database db_section=main description="Switch mx_room_state from Python to Go format" from=12 single_txn=true to=13
2024-02-16T19:24:43+01:00 INF Upgrading database db_section=main description="Remove redundant notice_room column from users" from=13 single_txn=true to=14
2024-02-16T19:24:43+01:00 INF Upgrading database db_section=main description="Remove unused columns in puppet table" from=14 single_txn=true to=15
2024-02-16T19:24:43+01:00 INF Upgrading database db_section=main description="Refactor types (Postgres)" from=15 single_txn=true to=16
2024-02-16T19:24:43+01:00 INF Upgrading database db_section=main description="Refactor types (SQLite)" from=16 single_txn=false to=17
2024-02-16T19:24:43+01:00 FTL Failed to initialize database error="failed to run upgrade v16->v17: no such column: part_index" db_section=main
tulir commented 7 months ago

@KsmoinO can you confirm if it works with the latest commit?

KsmoinO commented 7 months ago

Have I to build it or is there a simplier way ?

tulir commented 7 months ago

All commits are built in CI: https://docs.mau.fi/bridges/go/setup.html?bridge=signal#downloading-a-prebuilt-executable-from-ci

KsmoinO commented 7 months ago

Latest build fixes the issue. Thanks 😉