mirror of
https://github.com/Hestia-Homes/survey-extraction.git
synced 2026-06-30 13:10:56 +00:00
load db first
This commit is contained in:
parent
fd5b15b41a
commit
993943c8ee
2 changed files with 8 additions and 2 deletions
3
.github/workflows/db_migration.yml
vendored
3
.github/workflows/db_migration.yml
vendored
|
|
@ -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
7
etl/load_metadata.py
Normal 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")
|
||||
Loading…
Add table
Reference in a new issue