
from alembic import op
import sqlalchemy as sa

revision = "20260415_release_b1_b2"
down_revision = "20260414_release_a_clients"

def upgrade():
    op.create_table(
        "client_associations",
        sa.Column("id", sa.Integer(), primary_key=True),
        sa.Column("client_id", sa.Integer(), nullable=False),
        sa.Column("association_type", sa.String(50), nullable=False),
        sa.Column("firm_tenant_id", sa.Integer(), nullable=True),
        sa.Column("partner_user_id", sa.Integer(), nullable=True),
        sa.Column("consultant_id", sa.Integer(), nullable=True),
        sa.Column("created_source", sa.String(50), nullable=False),
    )

def downgrade():
    op.drop_table("client_associations")
