From 95cc472037fcb3207b510e67f1a44af4e2a2cae9 Mon Sep 17 00:00:00 2001
From: Ellie Huxtable <ellie@elliehuxtable.com>
Date: Thu, 18 Apr 2024 16:41:28 +0100
Subject: chore: move crates into crates/ dir (#1958)

I'd like to tidy up the root a little, and it's nice to have all the
rust crates in one place
---
 .../atuin-client/migrations/20220505083406_create-events.sql  | 11 +++++++++++
 1 file changed, 11 insertions(+)
 create mode 100644 crates/atuin-client/migrations/20220505083406_create-events.sql

(limited to 'crates/atuin-client/migrations/20220505083406_create-events.sql')

diff --git a/crates/atuin-client/migrations/20220505083406_create-events.sql b/crates/atuin-client/migrations/20220505083406_create-events.sql
new file mode 100644
index 00000000..f6cafeba
--- /dev/null
+++ b/crates/atuin-client/migrations/20220505083406_create-events.sql
@@ -0,0 +1,11 @@
+create table if not exists events (
+	id text primary key,
+	timestamp integer not null,
+	hostname text not null,
+	event_type text not null,
+
+	history_id text not null
+);
+
+-- Ensure there is only ever one of each event type per history item
+create unique index history_event_idx ON events(event_type, history_id);
-- 
cgit v1.3.1

