REFACTOR external service and improve websocket training

This commit is contained in:
Urtzi Alfaro
2025-10-09 14:11:02 +02:00
parent 7c72f83c51
commit 3c689b4f98
111 changed files with 13289 additions and 2374 deletions

View File

@@ -0,0 +1,32 @@
"""make product_name nullable
Revision ID: a1b2c3d4e5f6
Revises: 706c5b559062
Create Date: 2025-10-09 04:55:00.000000
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision: str = 'a1b2c3d4e5f6'
down_revision: Union[str, None] = '706c5b559062'
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
# Make product_name nullable since we use inventory_product_id as the primary reference
op.alter_column('forecasts', 'product_name',
existing_type=sa.VARCHAR(length=255),
nullable=True)
def downgrade() -> None:
# Revert to not null (requires data to be populated first)
op.alter_column('forecasts', 'product_name',
existing_type=sa.VARCHAR(length=255),
nullable=False)