Files
ai-exchange/migrations/033_create_news_provider_snapshots.sql
T
2026-05-08 17:08:55 +08:00

14 lines
474 B
SQL

create table if not exists news_provider_snapshots (
id bigserial primary key,
provider_name text not null unique,
fetched_ts timestamptz,
freshness_code text not null,
event_count integer not null default 0,
is_active boolean not null default false,
code text not null,
active_events jsonb not null default '[]'::jsonb,
error text,
raw_payload jsonb not null default '{}'::jsonb,
updated_at timestamptz not null default now()
);