add init_db

This commit is contained in:
agatha 2024-09-22 14:11:17 -04:00
parent d710dc723e
commit 336cd61a8c

10
harvester/db/schema.py Normal file
View File

@ -0,0 +1,10 @@
from sqlalchemy import MetaData, create_engine
from sqlalchemy.ext.declarative import declarative_base
metadata = MetaData()
Base = declarative_base(metadata=metadata)
def init_db(engine_url):
engine = create_engine(engine_url)
Base.metadata.create_all(engine)