identity column

This commit is contained in:
projectmoon 2024-04-10 00:03:44 +02:00
parent e6c88fe7e6
commit 082feeb847
1 changed files with 5 additions and 4 deletions

View File

@ -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.