This commit is contained in:
2017-09-05 21:35:22 -04:00
parent 7399429405
commit 1f533832d0
7 changed files with 149 additions and 66 deletions

18
models.py Normal file
View File

@@ -0,0 +1,18 @@
from sqlalchemy import create_engine, Column, String, Integer
from sqlalchemy.orm import sessionmaker
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
engine = create_engine('sqlite:///boards.db')
session = sessionmaker(bind=engine)()
class Board(Base):
__tablename__ = 'boards'
id = Column(Integer, primary_key=True)
layout = Column(String(100), nullable=False)
name = Column(String(50), nullable=False)