From e3fe992cd2dd36e03b14a3c1b34103f8635cfdec Mon Sep 17 00:00:00 2001 From: nobody Date: Tue, 6 Aug 2024 22:04:05 +0200 Subject: [PATCH] add utility scripts for db adjustments --- util/clear_nonpwd.sh | 2 ++ util/clear_to.sh | 2 ++ 2 files changed, 4 insertions(+) create mode 100755 util/clear_nonpwd.sh create mode 100755 util/clear_to.sh diff --git a/util/clear_nonpwd.sh b/util/clear_nonpwd.sh new file mode 100755 index 0000000..31fa080 --- /dev/null +++ b/util/clear_nonpwd.sh @@ -0,0 +1,2 @@ +#!/bin/sh +find . -iname '*.sqlite' -exec sqlite3 '{}' "DELETE FROM kv_store WHERE key NOT LIKE '%-password' AND key NOT LIKE '%-secret' AND key != 'email-to';" ';' diff --git a/util/clear_to.sh b/util/clear_to.sh new file mode 100755 index 0000000..cfe78f9 --- /dev/null +++ b/util/clear_to.sh @@ -0,0 +1,2 @@ +#!/bin/sh +find . -iname '*.sqlite' -exec sqlite3 '{}' "DELETE FROM kv_store WHERE key = 'email-to';" ';'