34 lines
1.0 KiB
Python
34 lines
1.0 KiB
Python
"""delete duplicated column with altitude
|
|
|
|
Revision ID: e3620deb41b6
|
|
Revises: 03de3f7f8fdd
|
|
Create Date: 2024-07-15 06:35:13.536320
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import mysql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = 'e3620deb41b6'
|
|
down_revision = '03de3f7f8fdd'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
|
|
op.rename_table("flight_track", "flight_turn_point")
|
|
op.create_index(op.f('ix_track_point_timestamp'), 'track_point', ['timestamp'], unique=False)
|
|
op.drop_column('track_point', 'elevation')
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.add_column('track_point', sa.Column('elevation', mysql.FLOAT(), nullable=True))
|
|
op.drop_index(op.f('ix_track_point_timestamp'), table_name='track_point')
|
|
op.rename_table("flight_turn_point", "flight_track")
|
|
# ### end Alembic commands ###
|