feat: Datenmodell (SQLAlchemy) und Alembic-Migration

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
2026-07-17 17:09:02 +02:00
parent 53ffd65104
commit d37cb230c4
10 changed files with 633 additions and 0 deletions

17
finance/tests/conftest.py Normal file
View File

@@ -0,0 +1,17 @@
import pytest
from sqlalchemy import create_engine
from sqlalchemy.orm import Session
from sqlalchemy.pool import StaticPool
from app.db import Base
@pytest.fixture
def db():
engine = create_engine(
"sqlite://", poolclass=StaticPool,
connect_args={"check_same_thread": False},
)
Base.metadata.create_all(engine)
with Session(engine) as session:
yield session