mlco2 / codecarbon

Track emissions from Compute and recommend ways to reduce their impact on the environment.
https://mlco2.github.io/codecarbon
MIT License
1.18k stars 177 forks source link

fix(api): python version to 3.11 + fix last alembic upgrade #601

Closed inimaz closed 4 months ago

inimaz commented 4 months ago

Fix the alembic downgrades/upgrades to be able to work with the new schema.

How to test this

  1. Add the db url to your env variables export DATABASE_URL=YOUR_DB_URL

  2. Downgrade the db to start from scratch hatch run api:downgrade-db

  3. Upgrade to the latest status hatch run api:setup-db

(This has been used to deploy to dev)