# Test web3signer database migration (flyway) - [x] Prater - [x] Pablo - [x] Diego - [x] Mark - [x] Marce - [x] Gnosis - [x] Pablo - [x] Diego - [x] Mark - [x] Marce - [ ] Mainnet - [x] Pablo - [x] Diego - [x] Mark - [ ] Marce ### Description The Shapella introduces a mandatory migration in the signer database (postgres). For running signers, this migration must be performed "on the fly", so the signer service must be running. This makes necessary to introduce a new service (flyway) to migrate on the fly this postgres database. This is a critical step since there has been implemented a dependant between all the services: - Flyway depends on postgres startup - Brain and signer depends on flyways startup and suceed **Note:** It is normal to have 1 service (flyway) stopped after the update. Unless you have latest dappmanager ([0.2.64](https://github.com/dappnode/DNP_DAPPMANAGER/releases/tag/v0.2.64)) your web3signer card in the stakers will be considered as de-selected due to 1 service not running. This situation is contemplated in the latest dappmanager. ### Issues reported - There was a typo in the signer prater published, so the migration failed. The issue was fixed and published before auto-update ### Test 1. Install production signer-mainnet (mainnet hash `/ipfs/QmaxzWSBmXhFAX6npRfUx7X54BnS1u9jKoUMWQF7RLmkyd`) 2. Import keystores 3. Update to signer-mainnet with flyway (mainnet hash `QmfSmBNsFZh8ke9s7p3PzgVjA5oao4UGRBDtmAx5jQsXha`) 4. Check flyway service logs. Logs should say something like: ``` Database version: 10 Latest migration file version: 11 Database version is less than the latest migration file version. Migrating... Flyway Community Edition 9.16.1 by Redgate See release notes here: https://rd.gt/416ObMi Database: jdbc:postgresql://postgres.web3signer-prater.dappnode:5432/web3signer (PostgreSQL 14.1) Schema history table "public"."flyway_schema_history" does not exist yet Successfully validated 11 migrations (execution time 00:00.016s) Creating Schema History table "public"."flyway_schema_history" with baseline ... Successfully baselined schema with version: 10 Current version of schema "public": 10 Migrating schema "public" to version "00011 - bigint indexes" Successfully applied 1 migration to schema "public", now at version v00011 (execution time 00:00.108s) Migration completed ``` 5. Check signer and brain services started after the migration. 6. Check brain UI.