GuardianLabs / polygon-dash

Miner watch dashboard for Polygon
0 stars 3 forks source link

Refactor/cardano rating #32

Closed ichorid closed 1 year ago

ichorid commented 1 year ago

continuing from #29

This is a radical refactor of the backend (regarding file names, dir structure, etc.):

Breaking ~news~ changes

Cardano and Polygon modes must use different databases. However, to be able to reuse the Polygon-related code (routes, etc.), I put Polygon and Cardano into the same ORM classes. Unfortunately, this required minor changes to Polygon database format. To convert an existing (Polygon) DB to work with the new code, one should use upgrade mode of the CLI: python -m polydash --settings settings.yaml upgrade

At the first run with the given mode the app will put a mark into the DB with the corresponding network. At the next run, it will refuse to run if the network type mark in the DB does not match the running mode (e.g. trying using Polygon DB with Cardano mode).

Known bugs/deficiencies