"""add updated_time field

Revision ID: 0bee3d6dba76
Revises: 3b0a6e67cc58
Create Date: 2024-10-01 12:21:00.709029

"""

from alembic import op
import sqlalchemy as sa

from redun.backends.db import DateTimeUTC

# revision identifiers, used by Alembic.
revision = "0bee3d6dba76"
down_revision = "3b0a6e67cc58"
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("execution", schema=None) as batch_op:
        batch_op.add_column(sa.Column("updated_time", DateTimeUTC(timezone=True), nullable=True))

    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    with op.batch_alter_table("execution", schema=None) as batch_op:
        batch_op.drop_column("updated_time")

    # ### end Alembic commands ###
