Skip to content

Commit 89a02b9

Browse files
committed
Populate Murfey database tables using 'SQLModel.metadata.create_all()'
1 parent 8f298d8 commit 89a02b9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/conftest.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
from sqlalchemy.ext.declarative import DeclarativeMeta
1212
from sqlalchemy.orm import Session as SQLAlchemySession
1313
from sqlalchemy.orm import sessionmaker
14+
from sqlmodel import SQLModel
1415

1516
from murfey.util.db import Session as MurfeySession
1617

@@ -249,6 +250,7 @@ def murfey_db_engine():
249250
f"@{os.environ['POSTGRES_HOST']}:{os.environ['POSTGRES_PORT']}/{os.environ['POSTGRES_DB']}"
250251
)
251252
engine = create_engine(url)
253+
SQLModel.metadata.create_all(engine)
252254
yield engine
253255
engine.dispose()
254256

0 commit comments

Comments
 (0)