fix views analytics (#885)

* fix views analytics

* update ip stripping

* update clickhouse tables

* fix broken queries

* Fix panics

* fix download undercounting

* fix packerator failing sometimes

* run prep
This commit is contained in:
Geometrically
2024-03-02 14:04:46 -07:00
committed by GitHub
parent 04d834187b
commit e2ffeab8fa
12 changed files with 207 additions and 140 deletions

View File

@@ -42,14 +42,15 @@ pub async fn init_client_with_database(
user_id UInt64,
project_id UInt64,
monetized Bool DEFAULT True,
ip IPv6,
country String,
user_agent String,
headers Array(Tuple(String, String)),
headers Array(Tuple(String, String))
)
ENGINE = MergeTree()
PRIMARY KEY (project_id, recorded)
PRIMARY KEY (project_id, recorded, ip)
"
))
.execute()
@@ -71,10 +72,10 @@ pub async fn init_client_with_database(
ip IPv6,
country String,
user_agent String,
headers Array(Tuple(String, String)),
headers Array(Tuple(String, String))
)
ENGINE = MergeTree()
PRIMARY KEY (project_id, recorded)
PRIMARY KEY (project_id, recorded, ip)
"
))
.execute()
@@ -94,10 +95,10 @@ pub async fn init_client_with_database(
loader String,
game_version String,
parent UInt64,
parent UInt64
)
ENGINE = MergeTree()
PRIMARY KEY (project_id, recorded)
PRIMARY KEY (project_id, recorded, user_id)
"
))
.execute()