"""create virtual_card_purchases

Revision ID: cbb76f58ac5c
Revises: ee29c4e46e89
Create Date: 2025-11-15 12:34:03.876450

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = 'cbb76f58ac5c'
down_revision: Union[str, None] = 'ee29c4e46e89'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_constraint('cards_user_id_fkey', 'cards', type_='foreignkey')
    op.drop_column('cards', 'user_id')
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column('cards', sa.Column('user_id', sa.VARCHAR(), autoincrement=False, nullable=False))
    op.create_foreign_key('cards_user_id_fkey', 'cards', 'users', ['user_id'], ['id'])
    # ### end Alembic commands ###
