aboutsummaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
Diffstat (limited to 'db')
-rw-r--r--db/generate_secret.sql8
1 files changed, 8 insertions, 0 deletions
diff --git a/db/generate_secret.sql b/db/generate_secret.sql
new file mode 100644
index 000000000..ad4b48200
--- /dev/null
+++ b/db/generate_secret.sql
@@ -0,0 +1,8 @@
+-- assumes there's a secret table (from the schema.sql)
+-- use your own secret if you have one :-)
+-- otherwise you can use this to populate the secret table with a random secret
+
+-- empty the table in case it has a value already (i.e., this is *destructive*!)
+delete from secret;
+
+insert into secret values (md5(random()::text));