Skip to content

Commit cd66f88

Browse files
fix(processor): use python -m for alembic/uvicorn and add if_not_exists to migration (#7)
1 parent b4f7fb1 commit cd66f88

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ ENV PORT=8000 \
5252
# Expose port
5353
EXPOSE 8000
5454

55-
CMD ["sh", "-c", "alembic upgrade head && python -m scripts.run_seeders && uvicorn src.main:app --host $HOST --port $PORT"]
55+
CMD ["sh", "-c", "python -m alembic upgrade head && python -m scripts.run_seeders && python -m uvicorn src.main:app --host $HOST --port $PORT"]

migrations/versions/26a14ac7025d_.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ def upgrade() -> None:
5151
sa.Column('total_tokens', sa.Integer(), nullable=False),
5252
sa.Column('created_at', sa.DateTime(timezone=True), server_default=sa.text('now()'), nullable=True),
5353
sa.ForeignKeyConstraint(['agent_id'], ['evo_core_agents.id'], ondelete='CASCADE'),
54-
sa.PrimaryKeyConstraint('id')
54+
sa.PrimaryKeyConstraint('id'),
55+
if_not_exists=True
5556
)
5657

5758

0 commit comments

Comments
 (0)