Files
coder/coderd/database/migrations/000603_connection_logs_client_session_id.up.sql
T
Asher 957aefa475 feat: add client_session_id to connection_logs table (#29686)
The client session ID is not populated yet; this just adds the ability
for agents to send a client session ID with the rest of the connection
data, once it gets piped through.
2026-09-27 22:38:36 -08:00

6 lines
380 B
SQL

ALTER TABLE connection_logs
ADD COLUMN IF NOT EXISTS client_session_id text DEFAULT NULL
CHECK (client_session_id IS NULL OR client_session_id ~ '^[0-9a-f]{32}$');
COMMENT ON COLUMN connection_logs.client_session_id IS 'Tracks all connections over the lifetime of a single client (IDE or ssh) session. As it originates from the client, it is not guaranteed to be unique.';