Mac not support screen
[rainbowstream.git] / rainbowstream / table_def.py
CommitLineData
18cab06a
O
1from sqlalchemy import *
2from sqlalchemy.ext.declarative import declarative_base
3
4engine = create_engine('sqlite:///rainbow.db', echo=False)
5Base = declarative_base()
6
b2b933a9 7
18cab06a
O
8class Map(Base):
9
10 __tablename__ = "map"
11
12 rainbow_id = Column(Integer, primary_key=True)
13 tweet_id = Column(Integer)
14
15 def __init__(self, tweet_id):
16 self.tweet_id = tweet_id
17
b2b933a9 18
eb9781ed 19def init_db():
b2b933a9 20 Base.metadata.create_all(engine)