Uprava struktury letu a fotky, uprava GPS pozic v DB

This commit is contained in:
Michal Kváček
2023-07-03 13:23:59 +02:00
parent ba5c3b6a49
commit f8245492b9
18 changed files with 277 additions and 77 deletions
@@ -0,0 +1,34 @@
"""fix typo
Revision ID: 7dc6dd7d0f59
Revises: ef51b2cd596a
Create Date: 2023-06-29 15:43:44.520087
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = '7dc6dd7d0f59'
down_revision = 'ef51b2cd596a'
branch_labels = None
depends_on = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('photo', sa.Column('point_of_interest_id', sa.Integer(), nullable=True))
op.drop_constraint('photo_ibfk_3', 'photo', type_='foreignkey')
op.create_foreign_key(None, 'photo', 'point_of_interest', ['point_of_interest_id'], ['id'])
op.drop_column('photo', 'poin_of_interest_id')
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column('photo', sa.Column('poin_of_interest_id', mysql.INTEGER(display_width=11), autoincrement=False, nullable=True))
op.drop_constraint(None, 'photo', type_='foreignkey')
op.create_foreign_key('photo_ibfk_3', 'photo', 'point_of_interest', ['poin_of_interest_id'], ['id'])
op.drop_column('photo', 'point_of_interest_id')
# ### end Alembic commands ###