feat: harden community production foundation through story 1.5
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
alter table invocation_logs
|
||||
add column trace_id text;
|
||||
|
||||
alter table invocation_logs
|
||||
add constraint invocation_logs_trace_id_format_check
|
||||
check (
|
||||
trace_id is null
|
||||
or (
|
||||
trace_id ~ '^[0-9a-f]{32}$'
|
||||
and trace_id <> '00000000000000000000000000000000'
|
||||
)
|
||||
) not valid;
|
||||
|
||||
create index invocation_logs_workspace_request_id_idx
|
||||
on invocation_logs(workspace_id, request_id)
|
||||
where request_id is not null and octet_length(request_id) <= 128;
|
||||
|
||||
create index invocation_logs_workspace_trace_id_idx
|
||||
on invocation_logs(workspace_id, trace_id)
|
||||
where trace_id is not null;
|
||||
Reference in New Issue
Block a user