atuin/atuin-client/record-migrations/20230531212437_create-records.sql
Ellie Huxtable ae1709dafd
Key values (#1038)
* wip

* Start testing

* Store host IDs, not hostnames

Why? Hostnames can change a lot, and therefore host filtering can be
funky. Really, all we want is a unique ID per machine + do not care what
it might be.

* Mostly just write a fuckload of tests

* Add a v0 kv store I can push to

* Appending works

* Add next() and iterate, test the pointer chain

* Fix sig

* Make clippy happy and thaw the ICE

* Fix tests'

* Fix tests

* typed builder and cleaner db trait

---------

Co-authored-by: Conrad Ludgate <conrad.ludgate@truelayer.com>
2023-06-14 21:18:24 +01:00

16 lines
398 B
SQL

-- Add migration script here
create table if not exists records (
id text primary key,
parent text unique, -- null if this is the first one
host text not null,
timestamp integer not null,
tag text not null,
version text not null,
data blob not null
);
create index host_idx on records (host);
create index tag_idx on records (tag);
create index host_tag_idx on records (host, tag);