Slugy, webp, hromada zmen
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
"""pridani slugu, odstraneni deprecated sloupcu, pridani defaultu ke jmenu a popisumm
|
||||
|
||||
Revision ID: 6648fb80dd0e
|
||||
Revises: 022bf6fbcd47
|
||||
Create Date: 2024-01-03 06:17:13.457060
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import mysql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '6648fb80dd0e'
|
||||
down_revision = '022bf6fbcd47'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('aircraft', 'photo_filename')
|
||||
op.add_column('airport', sa.Column('airport_type', sa.Enum('airport', 'ull', 'heliport'), server_default='airport', nullable=False))
|
||||
op.add_column('airport', sa.Column('use_in_gpx_guess', sa.Boolean(), server_default='1', nullable=False))
|
||||
op.add_column('copilot', sa.Column('url_slug', sa.String(length=128), server_default='', nullable=False))
|
||||
op.add_column('copilot', sa.Column('is_public', sa.Boolean(), server_default='0', nullable=False))
|
||||
op.add_column('event', sa.Column('url_slug', sa.String(length=128), server_default='', nullable=False))
|
||||
op.add_column('flight', sa.Column('url_slug', sa.String(length=128), server_default='', nullable=False))
|
||||
op.alter_column('flight', 'takeoff_airport_id',
|
||||
existing_type=mysql.INTEGER(display_width=11),
|
||||
nullable=True)
|
||||
op.alter_column('flight', 'landing_airport_id',
|
||||
existing_type=mysql.INTEGER(display_width=11),
|
||||
nullable=True)
|
||||
op.add_column('photo', sa.Column('filename_extension', sa.String(length=4), nullable=False))
|
||||
op.add_column('photo', sa.Column('cache_key', sa.String(length=128), nullable=True))
|
||||
op.drop_column('photo', 'is_flight_cover')
|
||||
op.add_column('point_of_interest', sa.Column('url_slug', sa.String(length=128), server_default='', nullable=False))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
op.drop_column('point_of_interest', 'url_slug')
|
||||
op.add_column('photo', sa.Column('is_flight_cover', mysql.TINYINT(display_width=1), server_default=sa.text('0'), autoincrement=False, nullable=False))
|
||||
op.drop_column('photo', 'cache_key')
|
||||
op.drop_column('photo', 'filename_extension')
|
||||
op.alter_column('flight', 'landing_airport_id',
|
||||
existing_type=mysql.INTEGER(display_width=11),
|
||||
nullable=False)
|
||||
op.alter_column('flight', 'takeoff_airport_id',
|
||||
existing_type=mysql.INTEGER(display_width=11),
|
||||
nullable=False)
|
||||
op.drop_column('flight', 'url_slug')
|
||||
op.drop_column('event', 'url_slug')
|
||||
op.drop_column('copilot', 'is_public')
|
||||
op.drop_column('copilot', 'url_slug')
|
||||
op.drop_column('airport', 'use_in_gpx_guess')
|
||||
op.drop_column('airport', 'airport_type')
|
||||
op.add_column('aircraft', sa.Column('photo_filename', mysql.VARCHAR(length=128), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
Reference in New Issue
Block a user