/docs/self-host/migrations
Database migrations
Migrations are vendored in the API container. The first start of a release applies all pending migrations under an advisory lock; subsequent replicas no-op.
Required extensions
CREATE EXTENSION IF NOT EXISTS pgcrypto;
CREATE EXTENSION IF NOT EXISTS citext;
CREATE EXTENSION IF NOT EXISTS vector;Manual application (dev)
For local stacks you can apply migrations directly:
psql -U client -d obsrv_db -f schema/postgres/001_init.sql
psql -U client -d obsrv_db -f schema/postgres/002_clusters.sql
# … through schema/postgres/00N_*.sqlBackwards compatibility
obsrv enforces N-1 forward compatibility on the control plane: a release can run against the previous release's schema, so rolling deploys are safe. Schema-breaking migrations are gated behind a two-release window with explicit notes in the changelog.