From 41a27fc8d1c5114fe03fe863e5748342e89d80c8 Mon Sep 17 00:00:00 2001 From: Anderson Lemes Date: Sat, 25 Apr 2026 17:47:52 -0300 Subject: [PATCH] fix(processor): use python -m for alembic/uvicorn and add if_not_exists to migration --- Dockerfile | 2 +- migrations/versions/26a14ac7025d_.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7c0e9ad..3286173 100644 --- a/Dockerfile +++ b/Dockerfile @@ -52,4 +52,4 @@ ENV PORT=8000 \ # Expose port EXPOSE 8000 -CMD ["sh", "-c", "alembic upgrade head && python -m scripts.run_seeders && uvicorn src.main:app --host $HOST --port $PORT"] \ No newline at end of file +CMD ["sh", "-c", "python -m alembic upgrade head && python -m scripts.run_seeders && python -m uvicorn src.main:app --host $HOST --port $PORT"] \ No newline at end of file diff --git a/migrations/versions/26a14ac7025d_.py b/migrations/versions/26a14ac7025d_.py index 506c90a..6428466 100644 --- a/migrations/versions/26a14ac7025d_.py +++ b/migrations/versions/26a14ac7025d_.py @@ -51,7 +51,8 @@ def upgrade() -> None: sa.Column('total_tokens', sa.Integer(), nullable=False), sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True), sa.ForeignKeyConstraint(['agent_id'], ['evo_core_agents.id'], ondelete='CASCADE'), - sa.PrimaryKeyConstraint('id') + sa.PrimaryKeyConstraint('id'), + if_not_exists=True )