fix alembic migration (#47)

Co-authored-by: Kartik Sarangmath <kartiksarangmath@Kartiks-MacBook-Air.local>
This commit is contained in:
ksarangmath
2025-08-06 17:12:12 -07:00
committed by GitHub
parent ac6d7241ec
commit 1a96e8d997
2 changed files with 33 additions and 29 deletions

View File

@@ -1,29 +0,0 @@
"""Add name field to agent_instances
Revision ID: add_name_field_2024
Revises: f1a2b3c4d5e6
Create Date: 2024-01-01 00:00:00.000000
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "add_name_field_2024"
down_revision: Union[str, None] = "f1a2b3c4d5e6"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# Add name column to agent_instances table
op.add_column("agent_instances", sa.Column("name", sa.String(255), nullable=True))
def downgrade() -> None:
# Remove name column from agent_instances table
op.drop_column("agent_instances", "name")

View File

@@ -0,0 +1,33 @@
"""Add name field to agent_instances
Revision ID: f092b4fd6d89
Revises: 40d4252deb5b
Create Date: 2025-08-06 17:09:41.579517
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = "f092b4fd6d89"
down_revision: Union[str, None] = "40d4252deb5b"
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.add_column(
"agent_instances", sa.Column("name", sa.String(length=255), nullable=True)
)
# ### end Alembic commands ###
def downgrade() -> None:
# ### commands auto generated by Alembic - please adjust! ###
op.drop_column("agent_instances", "name")
# ### end Alembic commands ###