"""update created_at and updated_at in agente table

Revision ID: 893cd8ed8c4c
Revises: bd97ab8ba7db
Create Date: 2025-06-06 16:20:09.361846

"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql

revision = '893cd8ed8c4c'
down_revision = 'bd97ab8ba7db'
branch_labels = None
depends_on = None


def upgrade():
    with op.batch_alter_table('agente', schema=None) as batch_op:
        batch_op.alter_column('created_at',
               existing_type=mysql.DATETIME(),
               nullable=False)
        batch_op.alter_column('updated_at',
               existing_type=mysql.DATETIME(),
               nullable=False)


def downgrade():
    with op.batch_alter_table('agente', schema=None) as batch_op:
        batch_op.alter_column('updated_at',
               existing_type=mysql.DATETIME(),
               nullable=True)
        batch_op.alter_column('created_at',
               existing_type=mysql.DATETIME(),
               nullable=True)
