From fa35cfe710ab55596c1a5742a5ff4015d9c5dc20 Mon Sep 17 00:00:00 2001 From: Adrian Edwards <17362949+MoralCode@users.noreply.github.com> Date: Sun, 5 Jun 2022 23:03:47 -0400 Subject: [PATCH] add migration for deleting the school_id column --- ...fb763_remove_school_id_on_meeting_times.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 migrations/versions/9a408a3fb763_remove_school_id_on_meeting_times.py diff --git a/migrations/versions/9a408a3fb763_remove_school_id_on_meeting_times.py b/migrations/versions/9a408a3fb763_remove_school_id_on_meeting_times.py new file mode 100644 index 0000000..985225b --- /dev/null +++ b/migrations/versions/9a408a3fb763_remove_school_id_on_meeting_times.py @@ -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 ###