Files
api/alembic/versions/20230629-154344_fix_typo_7dc6dd7d0f59.py
T

35 lines
1.2 KiB
Python

"""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 ###