docs(trellis): update for cloud supabase migration

This commit is contained in:
qzl
2026-04-27 10:04:29 +08:00
parent 5325793203
commit 926929a3cb
2 changed files with 47 additions and 2 deletions
+19 -2
View File
@@ -9,10 +9,25 @@
This project uses:
- **SQLAlchemy 2.0** with async support (`asyncpg` driver)
- **Alembic** for schema migrations
- **Supabase Auth** as identity source
- **PostgreSQL** as primary database
- **Supabase Cloud** for Auth, Database, and Storage
- **PostgreSQL** as primary database (via Supabase connection pooler)
- **Soft delete** pattern with `deleted_at` column
### Cloud Supabase Connection
The project uses **Supabase Cloud** with connection pooling:
```bash
# .env configuration
ERYAO_DATABASE__HOST=aws-1-us-east-2.pooler.supabase.com
ERYAO_DATABASE__PORT=5432 # Session pooler (IPv4 compatible)
ERYAO_DATABASE__NAME=postgres
ERYAO_DATABASE__USER=postgres.<project-ref>
ERYAO_DATABASE__PASSWORD=<your-password>
```
**Note:** Direct database connection (port 5432 on `db.<project-ref>.supabase.co`) requires IPv6 and is not suitable for most development environments. Use the connection pooler instead.
---
## Query Patterns
@@ -133,6 +148,8 @@ def downgrade() -> None:
./infra/scripts/dev-migrate.sh bootstrap
```
**Note:** Cloud Supabase migrations may be slower than local due to network latency. Use appropriate timeouts for migration scripts.
**Alembic is the ONLY source of truth for schema changes.**
---