Add database functions for inserting history

No real tests yet :( I would like to avoid running postgres lol
This commit is contained in:
Ellie Huxtable
2023-06-26 08:09:00 +01:00
parent 5eb07c722e
commit fd51031bde
4 changed files with 53 additions and 1 deletions

View File

@ -1,6 +1,7 @@
-- Add migration script here
create table records (
id uuid primary key, -- remember to use uuidv7 for happy indices <3
client_id uuid not null, -- I am too uncomfortable with the idea of a client-generated primary key
host uuid not null, -- a unique identifier for the host
parent uuid not null, -- the ID of the parent record, bearing in mind this is a linked list
timestamp bigint not null, -- not a timestamp type, as those do not have nanosecond precision