text: """empty message
  
  Revision ID: 34d0d3dd52ed
  Revises: 
  Create Date: 2022-02-16 21:08:55.174663
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = '34d0d3dd52ed'
  down_revision = None
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.create_table('roles',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('name', sa.String(length=64), nullable=True),
      sa.PrimaryKeyConstraint('id'),
      sa.UniqueConstraint('name')
      )
      op.create_table('subscribes',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('name', sa.String(length=255), nullable=True),
      sa.Column('email', sa.String(length=255), nullable=True),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_index(op.f('ix_subscribes_email'), 'subscribes', ['email'], unique=True)
      op.create_table('users',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('username', sa.String(length=255), nullable=True),
      sa.Column('firstname', sa.String(length=255), nullable=True),
      sa.Column('lastname', sa.String(length=255), nullable=True),
      sa.Column('email', sa.String(length=255), nullable=True),
      sa.Column('biography', sa.String(length=255), nullable=True),
      sa.Column('profile_pic', sa.String(), nullable=True),
      sa.Column('password_secure', sa.String(length=255), nullable=True),
      sa.Column('role_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['role_id'], ['roles.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_index(op.f('ix_users_email'), 'users', ['email'], unique=False)
      op.create_index(op.f('ix_users_firstname'), 'users', ['firstname'], unique=False)
      op.create_index(op.f('ix_users_lastname'), 'users', ['lastname'], unique=False)
      op.create_index(op.f('ix_users_username'), 'users', ['username'], unique=False)
      op.create_table('posts',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.Column('title', sa.String(length=255), nullable=True),
      sa.Column('category', sa.String(), nullable=True),
      sa.Column('content', sa.String(), nullable=True),
      sa.Column('image_path', sa.String(), nullable=True),
      sa.Column('created_at', sa.DateTime(), nullable=True),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('comments',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('comment', sa.Text(), nullable=True),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.Column('post_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['post_id'], ['posts.id'], ),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('downvotes',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.Column('post_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['post_id'], ['posts.id'], ),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      op.create_table('upvotes',
      sa.Column('id', sa.Integer(), nullable=False),
      sa.Column('user_id', sa.Integer(), nullable=True),
      sa.Column('post_id', sa.Integer(), nullable=True),
      sa.ForeignKeyConstraint(['post_id'], ['posts.id'], ),
      sa.ForeignKeyConstraint(['user_id'], ['users.id'], ),
      sa.PrimaryKeyConstraint('id')
      )
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.drop_table('upvotes')
      op.drop_table('downvotes')
      op.drop_table('comments')
      op.drop_table('posts')
      op.drop_index(op.f('ix_users_username'), table_name='users')
      op.drop_index(op.f('ix_users_lastname'), table_name='users')
      op.drop_index(op.f('ix_users_firstname'), table_name='users')
      op.drop_index(op.f('ix_users_email'), table_name='users')
      op.drop_table('users')
      op.drop_index(op.f('ix_subscribes_email'), table_name='subscribes')
      op.drop_table('subscribes')
      op.drop_table('roles')
      # ### end Alembic commands ###
  