Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
widen 'isMigrationError' to catch constraint errors
On start-up, we run persistent migrations and in case of migration issues, we execute some particular handling (e.g. the pool db resets itself). Yet, we failed at catching migration issues coming from constraints introduced later and that can't be satisfied on already existing data. This commit fixes it. Before ====== [cardano-wallet.network:Info:22] Jörmungandr is ready. cardano-wallet-jormungandr: SQLite3 returned ErrorConstraint while attempting to perform step: NOT NULL constraint failed: pool_owner_backup.pool_owner_index (exiting with an error code) After ===== [cardano-wallet.network:Info:22] Jörmungandr is ready. [cardano-wallet.stake-pool-db:Error:22] Failed to migrate the database: : NOT NULL constraint failed: pool_owner_backup.pool_owner_index [cardano-wallet.stake-pool-db:Notice:22] Non backward compatible database found. Removing old database and re-creating it from scratch. Ignore the previous error. [cardano-wallet.stake-pool-db:Notice:22] 1 migrations were applied to the database. (... and continuing as normal)
- Loading branch information