Fix DB issues
This commit is contained in:
@@ -26,6 +26,9 @@ COPY --from=shared /shared /app/shared
|
||||
# Copy application code
|
||||
COPY services/forecasting/ .
|
||||
|
||||
# Copy scripts directory
|
||||
COPY scripts/ /app/scripts/
|
||||
|
||||
# Add shared libraries to Python path
|
||||
ENV PYTHONPATH="/app:/app/shared:${PYTHONPATH:-}"
|
||||
|
||||
|
||||
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
Forecasting Service Models Package
|
||||
|
||||
Import all models to ensure they are registered with SQLAlchemy Base.
|
||||
"""
|
||||
|
||||
# Import all models to register them with the Base metadata
|
||||
from .forecasts import Forecast
|
||||
from .predictions import ModelPerformanceMetric, PredictionCache
|
||||
|
||||
# List all models for easier access
|
||||
__all__ = [
|
||||
"Forecast",
|
||||
"ModelPerformanceMetric",
|
||||
"PredictionCache",
|
||||
]
|
||||
@@ -1,28 +0,0 @@
|
||||
"""Initial forecasting service tables
|
||||
|
||||
Revision ID: 001_initial_forecasting
|
||||
Create Date: 2024-01-01 12:00:00.000000
|
||||
|
||||
"""
|
||||
from typing import Sequence, Union
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision: str = '001_initial_forecasting'
|
||||
down_revision: Union[str, None] = None
|
||||
branch_labels: Union[str, Sequence[str], None] = None
|
||||
depends_on: Union[str, Sequence[str], None] = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# TODO: Add table creation statements for forecasting service
|
||||
# This is a placeholder migration - replace with actual table definitions
|
||||
pass
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# TODO: Add table drop statements for forecasting service
|
||||
pass
|
||||
Reference in New Issue
Block a user