- Introduced CombinedTrackModel, CombinedTrackCreate, and CombinedTrackRepository for managing combined tracks. - Implemented logic to create combined tracks based on existing tracks between two stations. - Added methods to check for existing combined tracks and retrieve constituent track IDs. - Enhanced TrackModel and TrackRepository to support OSM ID and track updates. - Created migration scripts for adding combined tracks table and OSM ID to tracks. - Updated services and API endpoints to handle combined track operations. - Added tests for combined track creation, repository methods, and API interactions.
20 lines
415 B
Python
20 lines
415 B
Python
"""Template for new Alembic migration scripts."""
|
|
|
|
from __future__ import annotations
|
|
import sqlalchemy as sa
|
|
from alembic import op
|
|
|
|
revision = '63d02d67b39e'
|
|
down_revision = '20251011_01'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade() -> None:
|
|
op.add_column('tracks', sa.Column(
|
|
'osm_id', sa.String(length=32), nullable=True))
|
|
|
|
|
|
def downgrade() -> None:
|
|
op.drop_column('tracks', 'osm_id')
|