feat(storage): S3-compatible storage adapter + storage_uri rename
Add S3FileStorage adapter (any S3-compatible backend: AWS, MinIO, Garage) alongside the local adapter, selected via STORAGE_BACKEND. Proxied range streaming via get_object+Range; as_local_path downloads to a tempfile for ffmpeg/fpcalc. Rename track.file_path -> storage_uri across domain entity, ORM, repositories, port, and services, with an Alembic migration. Adds mocked S3 unit tests. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
"""rename track file_path to storage_uri
|
||||
|
||||
Revision ID: 20260608_storage_uri
|
||||
Revises: e670d6c41d0c
|
||||
Create Date: 2026-06-08 11:32:00.000000
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from collections.abc import Sequence
|
||||
|
||||
from alembic import op
|
||||
|
||||
revision: str = "20260608_storage_uri"
|
||||
down_revision: str | None = "e670d6c41d0c"
|
||||
branch_labels: str | Sequence[str] | None = None
|
||||
depends_on: str | Sequence[str] | None = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
op.alter_column("tracks", "file_path", new_column_name="storage_uri")
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
op.alter_column("tracks", "storage_uri", new_column_name="file_path")
|
||||
Reference in New Issue
Block a user