ChatAI Docs

Versioning and migrations

Semver guarantees, database migration policy, and safe upgrades.

Product versioning

ChatAI uses Semantic Versioning. The canonical version lives in the repository root VERSION file and is mirrored in:

  • OpenAPI info.version
  • Git tags (v1.0.0, …)
  • GitHub Releases
ComponentVersioning
Self-hosted app (Docker image)Tracks product semver
@chatai/sdk, @chatai/widget, @chatai/reactSame major.minor as product when published
Database schemaForward-only Drizzle migrations; no down migrations

Database migration guarantees

Migrations live in packages/database/migrations/ and apply automatically on Docker boot via migrate.mjs.

GuaranteeDetail
Forward-onlyEach release adds numbered SQL files; we do not ship down migrations
Additive by defaultMinor/patch releases use additive DDL (new tables/columns, indexes)
Breaking DDLReserved for major releases with explicit upgrade notes
Legacy bootstrapPre-journal Docker installs are baselined before applying pending migrations
CI verificationpnpm test:migrations applies all migrations on a fresh Postgres

Before upgrading

  1. Back up Postgres and uploads — see Backup and upgrades.
  2. Read the release notes for migration-specific steps.
  3. Pull/rebuild and restart so the entrypoint runs pnpm migrate.

Embedding dimension constraint

The schema uses vector(1536). Switching to a model with a different dimension requires re-embedding all documents — surfaced in the dashboard when changing embedding providers.

Package semver (npm)

Publishable packages (@chatai/sdk, @chatai/widget, @chatai/react) follow the product major for breaking API/widget embed changes. Patch releases are bugfix-only.