Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20230705124511_create_events.sql « main « click_house « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8af45443e4ce4a08ed1e2d05875a763db6f97107 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
CREATE TABLE events
(
  id UInt64 DEFAULT 0,
  path String DEFAULT '',
  author_id UInt64 DEFAULT 0,
  target_id UInt64 DEFAULT 0,
  target_type LowCardinality(String) DEFAULT '',
  action UInt8 DEFAULT 0,
  deleted UInt8 DEFAULT 0,
  created_at DateTime64(6, 'UTC') DEFAULT now(),
  updated_at DateTime64(6, 'UTC') DEFAULT now()
)
ENGINE = ReplacingMergeTree(updated_at, deleted)
PRIMARY KEY (id)
ORDER BY (id)
PARTITION BY toYear(created_at)