"""Add `scanned_at`, `updated_at` columns to `artifacts`

Revision ID: 2cc8337d78a3
Revises: ba5207c55924
Create Date: 2025-09-03 10:52:39.346814

"""

import sqlalchemy as sa
from alembic import op

# revision identifiers, used by Alembic.
revision = "2cc8337d78a3"
down_revision = "ba5207c55924"
branch_labels = None
depends_on = None


def upgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.add_column(
        "artifacts",
        sa.Column("scanned_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False),
    )
    op.add_column(
        "artifacts",
        sa.Column("updated_at", sa.DateTime(), server_default=sa.text("now()"), nullable=False),
    )
    # ### end Alembic commands ###


def downgrade() -> None:
    # ### commands auto generated by Alembic - please adjust! ###
    op.drop_column("artifacts", "updated_at")
    op.drop_column("artifacts", "scanned_at")
    # ### end Alembic commands ###
