Files
HellreigN/backend/internal/storage/migrations.go
T
d3m0k1d d96f952d73
ci-agent / build (push) Failing after 22s
chore: add clickhouse as db for logs on agent and search
2026-04-03 23:23:43 +03:00

17 lines
415 B
Go

package storage
const CreateSqlite = ``
const CreateLogsTable = `
CREATE TABLE IF NOT EXISTS logs (
timestamp DateTime64(3) DEFAULT now(),
level LowCardinality(String),
service LowCardinality(String),
agent LowCardinality(String),
message String
) ENGINE = MergeTree()
ORDER BY (timestamp, level, service, agent)
TTL timestamp + INTERVAL 30 DAY
SETTINGS index_granularity = 8192
`