"""Add data lineage to features

Revision ID: c6bfa5794b5c
Revises: 32025d48c84e
Create Date: 2025-02-19 17:40:03.972024

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "c6bfa5794b5c"
down_revision = "32025d48c84e"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.create_table(
        "feature_input_association",
        sa.Column("feature_id", sa.Integer(), nullable=False),
        sa.Column("input_feature_id", sa.Integer(), nullable=False),
        sa.ForeignKeyConstraint(
            ["feature_id"],
            ["feature.id"],
            name=op.f("fk_feature_input_association_feature_id_feature"),
        ),
        sa.ForeignKeyConstraint(
            ["input_feature_id"],
            ["feature.id"],
            name=op.f("fk_feature_input_association_input_feature_id_feature"),
        ),
        sa.PrimaryKeyConstraint(
            "feature_id",
            "input_feature_id",
            name=op.f("pk_feature_input_association"),
        ),
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_table("feature_input_association")
    # ### end Alembic commands ###
