35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""product
|
|
|
|
Revision ID: 06605c625998
|
|
Revises: 28cfdbde1796
|
|
Create Date: 2025-04-22 10:10:18.082314
|
|
|
|
"""
|
|
from typing import Sequence, Union
|
|
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision: str = '06605c625998'
|
|
down_revision: Union[str, None] = '28cfdbde1796'
|
|
branch_labels: Union[str, Sequence[str], None] = None
|
|
depends_on: Union[str, Sequence[str], None] = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
"""Upgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint('physical_items_product_id_fkey', 'physical_items', type_='foreignkey')
|
|
op.create_foreign_key(None, 'physical_items', 'tcgplayer_products', ['product_id'], ['id'])
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade() -> None:
|
|
"""Downgrade schema."""
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_constraint(None, 'physical_items', type_='foreignkey')
|
|
op.create_foreign_key('physical_items_product_id_fkey', 'physical_items', 'products', ['product_id'], ['id'])
|
|
# ### end Alembic commands ###
|