39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
"""airports cannot be nullable
|
|
|
|
Revision ID: f85556b2ce2c
|
|
Revises: 1e04cd7838dd
|
|
Create Date: 2023-08-07 19:14:17.791435
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import mysql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'f85556b2ce2c'
|
|
down_revision = '1e04cd7838dd'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('flight', 'takeoff_airport_id',
|
|
existing_type=mysql.INTEGER(display_width=11),
|
|
nullable=False)
|
|
op.alter_column('flight', 'landing_airport_id',
|
|
existing_type=mysql.INTEGER(display_width=11),
|
|
nullable=False)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('flight', 'landing_airport_id',
|
|
existing_type=mysql.INTEGER(display_width=11),
|
|
nullable=True)
|
|
op.alter_column('flight', 'takeoff_airport_id',
|
|
existing_type=mysql.INTEGER(display_width=11),
|
|
nullable=True)
|
|
# ### end Alembic commands ###
|