Skip to content

Commit

Permalink
add migration for deleting the school_id column
Browse files Browse the repository at this point in the history
  • Loading branch information
MoralCode committed Jun 6, 2022
1 parent a287cd4 commit fa35cfe
Showing 1 changed file with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""remove school_id on meeting times
Revision ID: 9a408a3fb763
Revises: 2399c50496f7
Create Date: 2022-06-05 22:45:11.620997
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

# revision identifiers, used by Alembic.
revision = '9a408a3fb763'
down_revision = '2399c50496f7'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.drop_index('bellschedulemeetingtimes_FK', table_name='bellschedulemeetingtimes')
op.drop_column('bellschedulemeetingtimes', 'school_id')
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('bellschedulemeetingtimes', sa.Column('school_id', sa.BINARY(length=16), nullable=False))
op.create_index('bellschedulemeetingtimes_FK', 'bellschedulemeetingtimes', ['school_id'], unique=False)
# ### end Alembic commands ###

0 comments on commit fa35cfe

Please sign in to comment.