"""json_logs

Revision ID: 7e8c31ddb2db
Revises: 7a3913a3bb4c
Create Date: 2025-05-27 07:57:51.044585

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

# revision identifiers, used by Alembic.
revision = '7e8c31ddb2db'
down_revision = '387bed3ce6ae'
branch_labels = None
depends_on = None


def upgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.execute("UPDATE server_logs SET deployment_logs = '[]'")
    op.alter_column(
        "server_logs",
        "deployment_logs",
        server_default="[]",
        existing_server_default=""
    )
    # ### end Alembic commands ###


def downgrade():
    # ### commands auto generated by Alembic - please adjust! ###
    op.alter_column(
        "server_logs",
        "deployment_logs",
        server_default="",
        existing_server_default="[]"
    )
    op.execute("UPDATE server_logs SET deployment_logs = ''")
    # ### end Alembic commands ###
