"""auto update

Revision ID: 08dcf1b5bd8d
Revises: 4e8ac7d32894
Create Date: 2026-04-29 18:57:02.130538

"""
from typing import Sequence, Union

from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision: str = '08dcf1b5bd8d'
down_revision: Union[str, Sequence[str], None] = '4e8ac7d32894'
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.create_table('plans',
    sa.Column('id', sa.Integer(), autoincrement=True, nullable=False),
    sa.Column('service_type', sa.String(), nullable=False),
    sa.Column('name', sa.String(), nullable=False),
    sa.Column('price', sa.Float(), nullable=False),
    sa.Column('currency', sa.String(), nullable=True),
    sa.Column('billing_cycle', sa.String(), nullable=True),
    sa.Column('features', sa.String(), nullable=True),
    sa.Column('cta_label', sa.String(), nullable=True),
    sa.Column('cta_url', sa.String(), nullable=True),
    sa.Column('is_featured', sa.Boolean(), nullable=True),
    sa.Column('is_active', sa.Boolean(), nullable=True),
    sa.Column('sort_order', sa.Integer(), nullable=True),
    sa.Column('tagline', sa.String(), nullable=True),
    sa.Column('created_at', sa.DateTime(timezone=True), nullable=True),
    sa.Column('updated_at', sa.DateTime(timezone=True), nullable=True),
    sa.PrimaryKeyConstraint('id')
    )
    op.create_index(op.f('ix_plans_id'), 'plans', ['id'], unique=False)
    op.add_column('user_profiles', sa.Column('user_id', sa.String(), nullable=False))
    # ### end Alembic commands ###


def downgrade() -> None:
    """Downgrade schema."""
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column('user_profiles', 'user_id')
    op.drop_index(op.f('ix_plans_id'), table_name='plans')
    op.drop_table('plans')
    # ### end Alembic commands ###