summaryrefslogtreecommitdiff
path: root/scripts/clear-cache
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/clear-cache')
-rwxr-xr-xscripts/clear-cache17
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/clear-cache b/scripts/clear-cache
new file mode 100755
index 0000000..624a068
--- /dev/null
+++ b/scripts/clear-cache
@@ -0,0 +1,17 @@
+#!/bin/bash
+# Clear all cached data from the production database.
+# Usage: ./scripts/clear-cache
+# Deletes: cards, boards, tasks, calendar_events, cache_metadata, sync_tokens
+
+DB=/site/doot.terst.org/data/dashboard.db
+
+sqlite3 "$DB" "
+DELETE FROM cards;
+DELETE FROM boards;
+DELETE FROM tasks;
+DELETE FROM calendar_events;
+DELETE FROM cache_metadata;
+DELETE FROM sync_tokens;
+"
+
+echo "Cache cleared."