add init_db
This commit is contained in:
parent
d710dc723e
commit
336cd61a8c
10
harvester/db/schema.py
Normal file
10
harvester/db/schema.py
Normal 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)
|
Loading…
Reference in New Issue
Block a user