"""create_labresult_condition_table

Revision ID: 36efa7257f0d
Revises: 6f28c32c3198
Create Date: 2025-07-10 17:05:18.992859

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = '36efa7257f0d'
down_revision = '6f28c32c3198'
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table('lab_result_conditions',
    sa.Column('id', sa.Integer(), nullable=False),
    sa.Column('lab_result_id', sa.Integer(), nullable=False),
    sa.Column('condition_id', sa.Integer(), nullable=False),
    sa.Column('relevance_note', sa.String(), nullable=True),
    sa.Column('created_at', sa.DateTime(), nullable=False),
    sa.Column('updated_at', sa.DateTime(), nullable=False),
    sa.ForeignKeyConstraint(['condition_id'], ['conditions.id'], ),
    sa.ForeignKeyConstraint(['lab_result_id'], ['lab_results.id'], ),
    sa.PrimaryKeyConstraint('id')
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table('lab_result_conditions')
    # ### end Alembic commands ###
