# `logarchiver init-schema` Create the ClickHouse archive-index database and table (idempotent). ```sh logarchiver init-schema # execute the DDL against index.address logarchiver init-schema --print # print the DDL instead of executing it ``` In-cluster the argocd bootstrap Job owns schema creation (a ClickHouse PostSync hook, mirroring the logging stack's `clickhouse-schema` job). Use `init-schema --print` to emit the exact `CREATE DATABASE` / `CREATE TABLE` statements to embed in that Job, and `init-schema` (executing) for local/dev. The statements are the source-of-truth DDL from `internal/index/ddl.go`, also kept as [`schema/archive_index.sql`](../schema/archive_index.sql). Database and table names come from `index.database` / `index.table` (defaults `logs` / `archive_index`).