toncenter / ton-indexer

TON Indexer system to store and serve blockchain data using SQL-database
https://toncenter.com/api/v3/
GNU General Public License v3.0
69 stars 34 forks source link

Database 15 vs 16 fatal after pull, alembic revision issue #53

Closed adapt7 closed 6 months ago

adapt7 commented 7 months ago

After recent pull and docker rebuild the postgres won't start due to compatibility issues (v15 vs v16). No instructions how to handle this so reverted to 15.

When I changed postgres:16 to postgres:15, I get this from alembic:


alembic-1  | Database exists
alembic-1  | FAILED: Can't locate revision identified by '2f3ffe88be6b'
alembic-1 exited with code 255```

How to fix?
adapt7 commented 6 months ago

Looks like latest version pull and recreating docker VOLUME solves the problem:

docker volume rm ton-indexer_postgres_data (this clears postgres database data completely)

and then recreate / restart docker services:

docker compose up -d postgres alembic index-api docker compose up -d index-worker