"""run.code_digest `origin_commit` names a commit, and a dirty tree has the same one all day. The node bodies are import shims, so what actually ran is whatever was on disk when the worker started. This column hashes those files at run time, which is the only thing that tells two runs of an uncommitted tree apart. Revision ID: a4d9e2b71c68 Revises: f2c6a8d15e93 Create Date: 2026-08-26 """ import sqlalchemy as sa import sqlmodel.sql.sqltypes from alembic import op # revision identifiers, used by Alembic. revision = "a4d9e2b71c68" down_revision = "f2c6a8d15e93" branch_labels = None depends_on = None def upgrade(): op.add_column( "run", sa.Column( "code_digest", sqlmodel.sql.sqltypes.AutoString(length=64), nullable=False, server_default="", ), ) def downgrade(): op.drop_column("run", "code_digest")