Fix DDL race condition and PostgreSQL syntax error on startup
- _ensure_auth_tables now uses raw asyncpg.connect instead of get_session_store,
  avoiding PgSessionStore._MIGRATE running before navi_users exists
- Move _ensure_auth_tables before ensure_tables in startup so navi_users is
  created before any foreign-key references
- Replace invalid "ADD CONSTRAINT IF NOT EXISTS" with DO $$ block for
  memory_facts_user_cat_key

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
1 parent ee447b2 commit 704d8e6cf4f107de165f141daec8685c3d4f3627
@Eugene Sukhodolskiy Eugene Sukhodolskiy authored on 3 May
Showing 4 changed files
View
.env.example
View
navi/auth/_ddl.py
View
navi/main.py
View
navi/memory/_ddl.py