aboutsummaryrefslogtreecommitdiffstats
path: root/atuin-client/record-migrations
diff options
context:
space:
mode:
authorEllie Huxtable <ellie@elliehuxtable.com>2023-06-14 21:18:24 +0100
committerGitHub <noreply@github.com>2023-06-14 21:18:24 +0100
commitae1709dafd22ac3c64441472e90df8799253292e (patch)
tree88d1cb17af6af9948d44ffb7242d69be5743785d /atuin-client/record-migrations
parentBump debian from bullseye-20230502-slim to bullseye-20230612-slim (#1047) (diff)
downloadatuin-ae1709dafd22ac3c64441472e90df8799253292e.zip
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>
Diffstat (limited to 'atuin-client/record-migrations')
-rw-r--r--atuin-client/record-migrations/20230531212437_create-records.sql15
1 files changed, 15 insertions, 0 deletions
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);