feat: Projektgerüst, Datenmodell und initiale Migration

Schritt 1: src-Layout mit FastAPI-Stack, SQLAlchemy-2.x-Modell inkl.
Buchführung für Kopiermodus und Quarantäne, Alembic-Migration 0001,
strukturierte Logs, CLI (migrate/version), Changelog und Devlog.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Florian Wilde
2026-10-10 17:25:42 +02:00
co-authored by Claude Opus 5.5
commit a60daf0039
19 changed files with 1356 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
from __future__ import annotations
from collections.abc import Iterator
from pathlib import Path
import pytest
from sqlalchemy.orm import Session
from netmover.db import make_engine, make_session_factory, upgrade
@pytest.fixture
def db_url(tmp_path: Path) -> str:
url = f"sqlite:///{tmp_path / 'test.db'}"
upgrade(url)
return url
@pytest.fixture
def session(db_url: str) -> Iterator[Session]:
engine = make_engine(db_url)
factory = make_session_factory(engine)
with factory() as s:
yield s
engine.dispose()