# Path: models.py
# def tn(tablename):
#     """ shortcut to get tablename with prefix """
#     return '%s%s' % (TABLEPREFIX, tablename)


from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from migrate import *
from models import tn
#              )

# posts = Table(tn('posts'), meta,
#               Column('id', Integer, primary_key=True),
#               Column('title', String(200), unique=True, nullable=False),
#               Column('content', Text, nullable=False),
#               Column('status_id', Integer, ForeignKey('%s.id' % tn('status')), nullable=False),
#               Column('user_id', Integer, ForeignKey('%s.id' % tn('users')), nullable=False),
#               Column('format_id', Integer, ForeignKey('%s.id' % tn('formats')), nullable=False),
#               Column('createdate', DateTime, nullable=False),
#               Column('pubdate', DateTime, nullable=True),
#               Column('lastmoddate', DateTime, nullable=False),
#               )

# status = Table(tn('status'), meta,
#                Column('id', Integer, primary_key=True),
#                Column('value', String(32), unique=True),
#                )

# tags = Table(tn('tags'), meta,
#                Column('id', Integer, primary_key=True),
#                Column('value', String(64), unique=True),
#                )

# formats = Table(tn('format'), meta,
#                Column('id', Integer, primary_key=True),
#                Column('value', String(32), unique=True),
#                )

class Status(Base):

# Path: models.py
# def tn(tablename):
#     """ shortcut to get tablename with prefix """
#     return '%s%s' % (TABLEPREFIX, tablename)


# Path: migrations/versions/001_Add_initial_tables.py
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from migrate import *
from models import tn

#              )

# posts = Table(tn('posts'), meta,
#               Column('id', Integer, primary_key=True),
#               Column('title', String(200), unique=True, nullable=False),
#               Column('content', Text, nullable=False),
#               Column('status_id', Integer, ForeignKey('%s.id' % tn('status')), nullable=False),
#               Column('user_id', Integer, ForeignKey('%s.id' % tn('users')), nullable=False),
#               Column('format_id', Integer, ForeignKey('%s.id' % tn('formats')), nullable=False),
#               Column('createdate', DateTime, nullable=False),
#               Column('pubdate', DateTime, nullable=True),
#               Column('lastmoddate', DateTime, nullable=False),
#               )

# status = Table(tn('status'), meta,
#                Column('id', Integer, primary_key=True),
#                Column('value', String(32), unique=True),
#                )

# tags = Table(tn('tags'), meta,
#                Column('id', Integer, primary_key=True),
#                Column('value', String(64), unique=True),
#                )

# formats = Table(tn('format'), meta,
#                Column('id', Integer, primary_key=True),
#                Column('value', String(32), unique=True),
#                )

class Status(Base):

    __tablename__ = tn('status')