Creates the ClickHouse logs table with a recommended schema.
knex-clickhouse connection
name for the logs table
Optional
DDL options (engine, partitioning, TTL)
await createLogsTable(ch, 'application_logs', { ttl: 'timestamp + INTERVAL 90 DAY',}); Copy
await createLogsTable(ch, 'application_logs', { ttl: 'timestamp + INTERVAL 90 DAY',});
Creates the ClickHouse logs table with a recommended schema.