From ae1709dafd22ac3c64441472e90df8799253292e Mon Sep 17 00:00:00 2001 From: Ellie Huxtable Date: Wed, 14 Jun 2023 21:18:24 +0100 Subject: 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 --- .../record-migrations/20230531212437_create-records.sql | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 atuin-client/record-migrations/20230531212437_create-records.sql (limited to 'atuin-client/record-migrations') diff --git a/atuin-client/record-migrations/20230531212437_create-records.sql b/atuin-client/record-migrations/20230531212437_create-records.sql new file mode 100644 index 00000000..46963358 --- /dev/null +++ b/atuin-client/record-migrations/20230531212437_create-records.sql @@ -0,0 +1,15 @@ +-- 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); -- cgit v1.3.1