Generates ClickHouse CREATE TABLE statements from Ash resources.
ClickHouse tables require an engine and an ORDER BY key. This module maps
Ash primary keys and attributes to ClickHouse column definitions and produces
a CREATE TABLE IF NOT EXISTS statement using the engine configured in the
resource's clickhouse DSL block.
Summary
Functions
Generates ALTER TABLE ... ADD COLUMN IF NOT EXISTS statements for attributes
that exist on the resource but not yet in the table. This is a minimal schema
evolution pass: it adds new columns but does not drop or alter existing ones.
Generates the CREATE TABLE SQL for a resource.
Generates all migration statements (table creation) for a list of resources.
Functions
Generates ALTER TABLE ... ADD COLUMN IF NOT EXISTS statements for attributes
that exist on the resource but not yet in the table. This is a minimal schema
evolution pass: it adds new columns but does not drop or alter existing ones.
Returns an empty list when the table does not exist yet (the CREATE TABLE statement handles initial creation) or when there are no new columns.
Generates the CREATE TABLE SQL for a resource.
Generates all migration statements (table creation) for a list of resources.