openclimatefix / pv-site-datamodel

Datamodel for PV sites
MIT License
2 stars 10 forks source link

run alembic migrations instead of using sqlalchemy to migrate test db #169

Closed mduffin95 closed 1 day ago

mduffin95 commented 2 weeks ago

Initial change required for work on #165.

Currently the tests do not seem to test the actual alembic migrations but instead use sqlalchemy directly to build the DB schema. I guess this is problematic because it's not really testing what's in prod.

Because as part of #165 I'd like to use a DB trigger it makes sense to instead apply the alembic migrations so that it can be tested. The existing test setup wouldn't add the trigger.

mduffin95 commented 2 weeks ago

Not sure why the github actions workflow isn't running

peterdudfield commented 1 week ago

Not sure why the github actions workflow isn't running

The CI is currently set up only to run when a PR is opened. I need (or you could if you fancy it) change this so it runs on every change

mduffin95 commented 1 week ago

@peterdudfield I've fixed this PR and also added #171 to add the synchronize trigger.

mduffin95 commented 1 day ago

@peterdudfield yep it's ready