Skip to main content

control-plane.migrations

What this package owns​

  • Versioned ClickHouse schema migrations and the migration CLI entrypoint for Origo control-plane storage.

What this package does not own​

  • Runtime query semantics.
  • API request contracts.
  • Canonical event behavior above the storage layer.

Key entry points​

  • sql/
  • ../origo_control_plane/migrations/cli.py
  • ../origo_control_plane/migrations/runner.py

Major dependencies and adjacent modules​

  • Adjacent modules:
    • ../README.md
    • ../../docs/Developer/SQL-Migrations.md

Rules​

  1. File naming: NNNN__snake_case_name.sql
  2. Versions are contiguous and start at 0001
  3. Each file contains exactly one SQL statement
  4. Applied migrations are immutable
  5. Database names use {{DATABASE}} placeholders where required

Commands​

uv run python -m origo_control_plane.migrations status
uv run python -m origo_control_plane.migrations migrate

Canonical docs​

  • ../../docs/Developer/SQL-Migrations.md
  • ../../docs/Developer/Release-And-Deployment.md