fix: remove properties from sessions and final migration test

This commit is contained in:
Carl-Gerhard Lindesvärd
2025-12-03 21:36:59 +01:00
parent ac9901c77b
commit 396f509a2e
9 changed files with 48 additions and 18 deletions

View File

@@ -115,7 +115,6 @@ export async function up() {
'`referrer_type` LowCardinality(String)',
'`sign` Int8',
'`version` UInt64',
'`properties` Map(String, String) CODEC(ZSTD(3))',
],
// New ORDER BY: project_id, toDate(created_at), created_at, id
// Removed profile_id, reordered to match query patterns (date first, then id)
@@ -175,6 +174,45 @@ export async function up() {
...moveDataBetweenTables({
from: 'sessions',
to: 'sessions_new_20251123',
columns: [
'id',
'project_id',
'profile_id',
'device_id',
'created_at',
'ended_at',
'is_bounce',
'entry_origin',
'entry_path',
'exit_origin',
'exit_path',
'screen_view_count',
'revenue',
'event_count',
'duration',
'country',
'region',
'city',
'longitude',
'latitude',
'device',
'brand',
'model',
'browser',
'browser_version',
'os',
'os_version',
'utm_medium',
'utm_source',
'utm_campaign',
'utm_content',
'utm_term',
'referrer',
'referrer_name',
'referrer_type',
'sign',
'version',
],
batch: {
startDate: firstSessionDate,
column: 'toDate(created_at)',