# Path: models.py
# def tn(tablename):
#     def __init__(self, value):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, value):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, value):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, username, password):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, title=None, summary=None, content=None, createdate=None, pubdate=None, lastmoddate=None):
#     def compile(self, repl=None):
#     def __repr__(self):
#     def year(self):
#     def month(self):
#     def day(self):
#     def __init__(self, title=None, content=None, createdate=None, pubdate=None, lastmoddate=None):
#     def compile(self, repl=None):
#     def __repr__(self):
# class Status(Base,ImposterBase):
# class Format(Base,ImposterBase):
# class Tag(Base,ImposterBase):
# class User(Base,ImposterBase):
# class Post(Base,ImposterBase):
# class Page(Base):


from flask import Flask
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from migrate import *
from models import Post, Status, Tag, post_tags, tn
import migrate.changeset

Base = declarative_base()
meta = Base.metadata

count = Column('count', Integer, default=0)

def upgrade(migrate_engine):
    meta.bind = migrate_engine
    tags = Table(tn('tags'), meta, autoload=True)
    count.create(tags)

def downgrade(migrate_engine):
    meta.bind = migrate_engine

# Path: models.py
# def tn(tablename):
#     def __init__(self, value):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, value):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, value):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, username, password):
#     def __unicode__(self):
#     def __repr__(self):
#     def __init__(self, title=None, summary=None, content=None, createdate=None, pubdate=None, lastmoddate=None):
#     def compile(self, repl=None):
#     def __repr__(self):
#     def year(self):
#     def month(self):
#     def day(self):
#     def __init__(self, title=None, content=None, createdate=None, pubdate=None, lastmoddate=None):
#     def compile(self, repl=None):
#     def __repr__(self):
# class Status(Base,ImposterBase):
# class Format(Base,ImposterBase):
# class Tag(Base,ImposterBase):
# class User(Base,ImposterBase):
# class Post(Base,ImposterBase):
# class Page(Base):


# Path: migrations/versions/004_Add_count_column_to_Tag_model.py
from flask import Flask
from sqlalchemy import *
from sqlalchemy.ext.declarative import declarative_base
from migrate import *
from models import Post, Status, Tag, post_tags, tn
import migrate.changeset


Base = declarative_base()
meta = Base.metadata

count = Column('count', Integer, default=0)

def upgrade(migrate_engine):
    meta.bind = migrate_engine
    tags = Table(tn('tags'), meta, autoload=True)
    count.create(tags)

def downgrade(migrate_engine):
    meta.bind = migrate_engine

    tags = Table(tn('tags'), meta, autoload=True)