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, -- request ID is inserted by first cron job,
-- then second cron job updates from net._http_response table. -- then second cron job updates from net._http_response table.
create table if not exists raw_bus_positions ( create table if not exists raw_bus_positions (
request_id int not null, id BIGINT GENERATED ALWAYS AS IDENTITY,
created timestamp with time zone not null default now(), request_id INT not null,
response_status int null, created TIMESTAMP WITH TIME ZONE not null default now(),
response_json jsonb null response_status INT null,
response_json JSONB null
); );
-- used to help craft the API URL. Requires plv8 extension. -- used to help craft the API URL. Requires plv8 extension.