Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.84 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.84 KB

schemas/

Path What it is
migrations/ The journal: numbered SQL files server/core/schema/migrate.py applies in numeric order, at boot or with loom migrate
schema.sql The loom.* tables and views a replay of every migration leaves, generated by scripts/ops/dump_schema.py; read it, never edit it
otel/ ClickStack OTel tables, applied by hand (below)

Migrations holds the rules for writing a migration, baselines, runner directives, the sort-key rebuild recipe and the dump and check commands. Upgrades covers how a deployment applies them. Each migration file's header says what it changes.

Operator tools for a live deployment

Run by hand, never by the migrator; each file's header says when and how:

  • scripts/ops/table_rebuild.py: move a table with rows onto the sort or partition key a migration declares.
  • scripts/ops/vector_codec_rebuild.py: move a vector table onto the Quantized codec: twin table, consistency and recall gates, EXCHANGE.

otel/: ClickStack OTel tables

clickstack_otel_tables.sql creates the OTel tables HyperDX reads and LOOM_OTEL_EXPORTER=ch writes to, in the default database, for a deployment without a HyperDX install that already made them. It is not a migration: apply it once by hand (clickhouse-client --multiquery < schemas/otel/clickstack_otel_tables.sql); every statement is IF NOT EXISTS.