text: """parent student relationship
  
  Revision ID: b0619f03ee9e
  Revises: d09210d6aac8
  Create Date: 2021-12-20 12:49:54.831692
  
  """
  from alembic import op
  import sqlalchemy as sa
  
  
  # revision identifiers, used by Alembic.
  revision = 'b0619f03ee9e'
  down_revision = 'd09210d6aac8'
  branch_labels = None
  depends_on = None
  
  
  def upgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      with op.batch_alter_table('student', schema=None) as batch_op:
          batch_op.add_column(sa.Column('parent_id', sa.Integer(), nullable=True))
          batch_op.create_foreign_key(batch_op.f('fk_student_parent_id_parent'), 'parent', ['parent_id'], ['id'])
  
      # ### end Alembic commands ###
  
  
  def downgrade():
      # ### commands auto generated by Alembic - please adjust! ###
      with op.batch_alter_table('student', schema=None) as batch_op:
          batch_op.drop_constraint(batch_op.f('fk_student_parent_id_parent'), type_='foreignkey')
          batch_op.drop_column('parent_id')
  
      # ### end Alembic commands ###
  