35 lines
1000 B
Python
35 lines
1000 B
Python
"""flight duration
|
|
|
|
Revision ID: 419cf23cbf83
|
|
Revises: 559795b043f3
|
|
Create Date: 2023-06-06 17:41:26.375394
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import mysql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '419cf23cbf83'
|
|
down_revision = '559795b043f3'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('flight', sa.Column('duration_total', sa.Integer(), nullable=True))
|
|
op.alter_column('flight', 'duration_pic',
|
|
existing_type=mysql.INTEGER(display_width=11),
|
|
nullable=True)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.alter_column('flight', 'duration_pic',
|
|
existing_type=mysql.INTEGER(display_width=11),
|
|
nullable=False)
|
|
op.drop_column('flight', 'duration_total')
|
|
# ### end Alembic commands ###
|