text: """empty message
  
  Revision ID: a29e6503e99b
  Revises: 
  Create Date: 2018-05-09 04:12:04.836383
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = 'a29e6503e99b'
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('user',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('username', sa.String(length=64), nullable=True),
      sa.Column('email', sa.String(length=120), nullable=True),
      sa.Column('password_hash', sa.String(length=128), nullable=True),
      sa.Column('institution', sa.String(length=120), nullable=True),
      sa.Column('about_me', sa.String(length=140), nullable=True),
      sa.Column('last_seen', sa.DateTime(), nullable=True),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_index(op.f('ix_user_email'), 'user', ['email'], unique=True)
      op.create_index(op.f('ix_user_username'), 'user', ['username'], unique=True)
      op.create_table('followers',
      sa.Column('follower_id', sa.Integer(), nullable=True),
      sa.Column('followed_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['followed_id'], ['user.id'], ),
      sa.ForeignKeyConstraint(['follower_id'], ['user.id'], )
      )
      op.create_table('post',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('demand', sa.String(length=3), nullable=True),
      sa.Column('broad_category', sa.String(length=8), nullable=True),
      sa.Column('category', sa.String(length=20), nullable=True),
      sa.Column('price', sa.Numeric(), nullable=True),
      sa.Column('title', sa.String(length=140), nullable=True),
      sa.Column('body', sa.String(length=500), nullable=True),
      sa.Column('timestamp', sa.DateTime(), nullable=True),
      sa.Column('last_updated', sa.DateTime(), nullable=True),
      sa.Column('institution', sa.String(length=140), nullable=True),
      sa.Column('purchased', sa.Boolean(), nullable=True),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.Column('purchased_id', sa.Integer(), nullable=True),
      sa.Column('expired', sa.Boolean(), nullable=True),
      sa.ForeignKeyConstraint(['purchased_id'], ['user.id'], name='fk_purchased_user_id', use_alter=True),
      sa.ForeignKeyConstraint(['user_id'], ['user.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_index(op.f('ix_post_timestamp'), 'post', ['timestamp'], unique=False)
      op.create_table('review',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('reviewer_id', sa.Integer(), nullable=True),
      sa.Column('post_id', sa.Integer(), nullable=True),
      sa.Column('reviewee_id', sa.Integer(), nullable=True),
      sa.Column('rating', sa.String(length=120), nullable=True),
      sa.Column('body', sa.String(length=500), nullable=True),
      sa.Column('timestamp', sa.DateTime(), nullable=True),
      sa.ForeignKeyConstraint(['post_id'], ['post.id'], ),
      sa.ForeignKeyConstraint(['reviewee_id'], ['user.id'], ),
      sa.ForeignKeyConstraint(['reviewer_id'], ['user.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('review')
      op.drop_index(op.f('ix_post_timestamp'), table_name='post')
      op.drop_table('post')
      op.drop_table('followers')
      op.drop_index(op.f('ix_user_username'), table_name='user')
      op.drop_index(op.f('ix_user_email'), table_name='user')
      op.drop_table('user')
      # ### end Alembic commands ###
  