@@ -364,19 +364,19 @@ CREATE TABLE IF NOT EXISTS ${UPTIME_DATABASE}.uptime_monitor (
364364 site_id String CODEC(ZSTD(1)),
365365 url String CODEC(ZSTD(1)),
366366 timestamp DateTime64(3, 'UTC') CODEC(Delta(8), ZSTD(1)),
367- status UInt8 CODEC(Delta (1)),
368- http_code UInt16 CODEC(Delta(16 )),
369- ttfb_ms UInt32 CODEC(Delta(32 )),
370- total_ms UInt32 CODEC(Delta(32 )),
371- attempt UInt8 DEFAULT 1 CODEC(Delta (1)),
372- failure_streak UInt16 DEFAULT 0 CODEC(Delta(16 )),
373- response_bytes UInt32 DEFAULT 0 CODEC(Delta(32 )),
367+ status UInt8 CODEC(ZSTD (1)),
368+ http_code UInt16 CODEC(ZSTD(1 )),
369+ ttfb_ms UInt32 CODEC(ZSTD(1 )),
370+ total_ms UInt32 CODEC(ZSTD(1 )),
371+ attempt UInt8 DEFAULT 1 CODEC(ZSTD (1)),
372+ failure_streak UInt16 DEFAULT 0 CODEC(ZSTD(1 )),
373+ response_bytes UInt32 DEFAULT 0 CODEC(ZSTD(1 )),
374374 content_hash String CODEC(ZSTD(1)),
375- redirect_count UInt8 DEFAULT 0 CODEC(Delta (1)),
375+ redirect_count UInt8 DEFAULT 0 CODEC(ZSTD (1)),
376376 probe_region LowCardinality(String) DEFAULT 'default',
377377 probe_ip String CODEC(ZSTD(1)),
378378 ssl_expiry DateTime64(3, 'UTC') DEFAULT NULL,
379- ssl_valid UInt8 DEFAULT 1 CODEC(Delta (1)),
379+ ssl_valid UInt8 DEFAULT 1 CODEC(ZSTD (1)),
380380 env LowCardinality(String) DEFAULT 'prod',
381381 check_type LowCardinality(String) DEFAULT 'http',
382382 user_agent String DEFAULT 'uptime-monitor',
@@ -629,8 +629,6 @@ export async function initClickHouseSchema() {
629629 try {
630630 console . info ( "Initializing ClickHouse schema..." ) ;
631631
632- // Create the analytics database
633- console . log ( process . env . CLICKHOUSE_URL )
634632 await clickHouse . command ( {
635633 query : CREATE_DATABASE ,
636634 } ) ;
0 commit comments