- Tabellen users, sessions, login_attempts (Migration 0002) - UTCDateTime speichert UTC in SQLite und liefert aware datetimes - Tests legen das Schema über die echten Migrationen an - Test prüft, dass Migrationen und Modelle übereinstimmen Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
13 lines
346 B
Python
13 lines
346 B
Python
from alembic.autogenerate import compare_metadata
|
|
from alembic.migration import MigrationContext
|
|
|
|
from app.db import get_engine
|
|
from app.models import Base
|
|
|
|
|
|
def test_migrations_match_models(app_env):
|
|
with get_engine().connect() as conn:
|
|
diff = compare_metadata(MigrationContext.configure(conn), Base.metadata)
|
|
|
|
assert diff == []
|