feat: migrate SQLAlchemy from 1.4 to 2.0 with ORM style

- Remove encode/databases dependency, use native SQLAlchemy 2.0 async
- Convert all table definitions to Declarative Mapping pattern
- Update all controllers to accept session parameter (dependency injection)
- Convert all queries from Core style to ORM style
- Remove PostgreSQL compatibility checks (PostgreSQL only now)
- Add proper typing for engine and session factories
This commit is contained in:
2025-09-18 12:19:53 -06:00
parent 2b723da08b
commit 06639d4d8f
18 changed files with 911 additions and 750 deletions

View File

@@ -196,9 +196,9 @@ async def test_room_list_with_ics_enabled_filter():
assert len(all_rooms) == 3
# Filter for ICS-enabled rooms (would need to implement this in controller)
ics_rooms = [r for r in all_rooms if r["ics_enabled"]]
ics_rooms = [r for r in all_rooms if r.ics_enabled]
assert len(ics_rooms) == 2
assert all(r["ics_enabled"] for r in ics_rooms)
assert all(r.ics_enabled for r in ics_rooms)
@pytest.mark.asyncio