first commit
This commit is contained in:
commit
0b13673bcc
10 changed files with 220 additions and 0 deletions
11
DbSetup.py
Normal file
11
DbSetup.py
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
from sqlalchemy import create_engine
|
||||
from sqlalchemy.orm import Session
|
||||
from sqlalchemy.ext.declarative import declarative_base
|
||||
|
||||
databaseUrl = 'sqlite:///database.db'
|
||||
engine = create_engine(databaseUrl, future=True)
|
||||
session = Session(engine)
|
||||
Base = declarative_base()
|
||||
|
||||
def init_db():
|
||||
Base.metadata.create_all(bind=engine)
|
||||
Loading…
Add table
Add a link
Reference in a new issue