LC_8 / monitoring /schema.sql
github-actions[bot]
Deploy API from GitHub Actions
c7ee404
Raw History Blame Contribute Delete
1.23 kB
create table if not exists prediction_logs (
id bigint generated by default as identity primary key,
timestamp timestamptz not null,
event varchar(40) not null default 'prediction',
input_data jsonb not null,
prediction integer,
probability_of_default double precision,
risk_category varchar(20),
inference_time_ms double precision,
error text,
model_version varchar(120),
created_at timestamptz not null default now()
);
create index if not exists prediction_logs_timestamp_idx
on prediction_logs (timestamp);
create index if not exists prediction_logs_event_idx
on prediction_logs (event);
create table if not exists drift_events (
id bigint generated by default as identity primary key,
timestamp timestamptz not null,
drift_detected boolean,
feature varchar(100),
drift_score double precision,
p_value double precision,
ks_statistic double precision,
method varchar(50),
batch_size integer,
details jsonb,
created_at timestamptz not null default now()
);
create index if not exists drift_events_timestamp_idx
on drift_events (timestamp);
create index if not exists drift_events_feature_idx
on drift_events (feature);