text: """initial add blog id
  
  Revision ID: d5b496be3c00
  Revises: 7c8fd7de98a5
  Create Date: 2020-11-06 03:52:38.748004
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = 'd5b496be3c00'
  down_revision = '7c8fd7de98a5'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.add_column('comments', sa.Column('blog_id', sa.Integer(), nullable=True))
      op.drop_constraint('comments_pitch_id_fkey', 'comments', type_='foreignkey')
      op.create_foreign_key(None, 'comments', 'blogs', ['blog_id'], ['blog_id'])
      op.drop_column('comments', 'pitch_id')
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      op.add_column('comments', sa.Column('pitch_id', sa.INTEGER(), autoincrement=False, nullable=True))
      op.drop_constraint(None, 'comments', type_='foreignkey')
      op.create_foreign_key('comments_pitch_id_fkey', 'comments', 'blogs', ['pitch_id'], ['blog_id'])
      op.drop_column('comments', 'blog_id')
      # ### end Alembic commands ###
  