load db first

This commit is contained in:
Jun-te Kim 2025-04-01 12:21:53 +00:00
parent fd5b15b41a
commit 993943c8ee
2 changed files with 8 additions and 2 deletions

View file

@ -21,8 +21,7 @@ jobs:
poetry install --no-root
- name: run script
run: |
ls -la
ls -la alembic/
poetry run python etl/load_metadata.py
poetry run alembic upgrade head
env:
PYTHONPATH: ${{ github.workspace }}

7
etl/load_metadata.py Normal file
View file

@ -0,0 +1,7 @@
# A very simple script to load metadata to whatever db we connected to
from etl.db.db import get_db_session, init_db
init_db()
with get_db_session() as session:
print("Metadata loaded to db")