diff --git a/supabase/migrations/20240409190001_bus_funcs.sql b/supabase/migrations/20240409190001_bus_funcs.sql index 1b56f7e..73a4d38 100644 --- a/supabase/migrations/20240409190001_bus_funcs.sql +++ b/supabase/migrations/20240409190001_bus_funcs.sql @@ -6,10 +6,11 @@ CREATE EXTENSION IF NOT EXISTS "pg_net" SCHEMA extensions; -- request ID is inserted by first cron job, -- then second cron job updates from net._http_response table. create table if not exists raw_bus_positions ( - request_id int not null, - created timestamp with time zone not null default now(), - response_status int null, - response_json jsonb null + id BIGINT GENERATED ALWAYS AS IDENTITY, + request_id INT not null, + created TIMESTAMP WITH TIME ZONE not null default now(), + response_status INT null, + response_json JSONB null ); -- used to help craft the API URL. Requires plv8 extension.