honcho/tests/scripts
Phil 418e59ca2e feat(migrations): add tenant_id primitive migration (OSS prosumer-safe)
Add the alembic migration that makes tenant_id a first-class primitive: a new
tenants table + tenant_id with composite PKs / uniques / FKs / indexes on every
tenant-scoped table, matching the declarative models MINUS physical partitioning.
Self-host/prosumer safe: transforms the existing single-tenant schema in place and
backfills every row to a default tenant. A top-of-upgrade guard (tenants-exists)
makes it a no-op on the shared/prod schema, which the internal bootstrap builds and
alembic-stamps past.

Rename tenants.legacy_app_name -> vector_correlation_id (impl-agnostic: the durable
external vector-store namespace key, not legacy).

Remove scripts/bootstrap_shared_schema.py + its test from OSS -- the prod-only
shared-schema standup moves to the internal migration runbook. Strip internal /
migration-transient comments from models.py per the OSS-safe pass.

Verified: pytest tests/alembic -k e5fe7f8bcf62 passes on the full revision chain.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-09-03 11:54:56 -04:00
..
__init__.py Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
test_configure_embeddings.py feat: add new cloudevents for api routes (#637) 2026-05-20 18:25:30 -04:00