2026-02-25 10:20:43 +08:00
|
|
|
from __future__ import annotations
|
|
|
|
|
|
|
|
|
|
from pathlib import Path
|
|
|
|
|
|
|
|
|
|
|
2026-02-26 17:58:37 +08:00
|
|
|
def test_profiles_has_settings_column() -> None:
|
|
|
|
|
"""Verify profiles and auth trigger are defined in split migrations."""
|
2026-02-25 10:20:43 +08:00
|
|
|
versions_dir = Path(__file__).resolve().parents[3] / "alembic" / "versions"
|
2026-02-26 17:58:37 +08:00
|
|
|
migration_files = sorted(versions_dir.glob("20260226_*.py"))
|
|
|
|
|
content = "\n".join(m.read_text(encoding="utf-8") for m in migration_files)
|
2026-02-25 10:20:43 +08:00
|
|
|
|
2026-02-26 17:58:37 +08:00
|
|
|
assert 'create_table(\n "profiles"' in content
|
|
|
|
|
assert '"settings"' in content
|
|
|
|
|
assert "create_profile_for_new_user" in content
|
|
|
|
|
assert "on_auth_user_created" in content
|