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
---
 .../migrations/20230315224203_create-deleted.sql                     | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 crates/atuin-server-postgres/migrations/20230315224203_create-deleted.sql

(limited to 'crates/atuin-server-postgres/migrations/20230315224203_create-deleted.sql')

diff --git a/crates/atuin-server-postgres/migrations/20230315224203_create-deleted.sql b/crates/atuin-server-postgres/migrations/20230315224203_create-deleted.sql
new file mode 100644
index 00000000..9a9e6263
--- /dev/null
+++ b/crates/atuin-server-postgres/migrations/20230315224203_create-deleted.sql
@@ -0,0 +1,5 @@
+-- Add migration script here
+alter table history add column if not exists deleted_at timestamp;
+
+-- queries will all be selecting the ids of history for a user, that has been deleted
+create index if not exists history_deleted_index on history(client_id, user_id, deleted_at);
-- 
cgit v1.3.1

