From dcd77749dd1fdf6b0c8183bfbdf4f97bf238ebe4 Mon Sep 17 00:00:00 2001
From: Ellie Huxtable <ellie@elliehuxtable.com>
Date: Mon, 20 Mar 2023 09:26:54 +0000
Subject: Add history deletion (#791)

* Drop events. I'd still like to do them, but differently

* Start adding delete api stuff

* Set mailmap

* Delete delete delete

* Fix tests

* Make clippy happy
---
 atuin-server/migrations/20230315224203_create-deleted.sql | 5 +++++
 1 file changed, 5 insertions(+)
 create mode 100644 atuin-server/migrations/20230315224203_create-deleted.sql

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

diff --git a/atuin-server/migrations/20230315224203_create-deleted.sql b/atuin-server/migrations/20230315224203_create-deleted.sql
new file mode 100644
index 00000000..9a9e6263
--- /dev/null
+++ b/atuin-server/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

