From aafdeb9ffaf9a993ca4462b3422667e04469b2e3 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 20 Sep 2024 16:09:35 -0400 Subject: Expire messages after 90 days. This is intended to manage storage growth. A community with broadly steady traffic will now reach a steady state (ish) where the amount of storage in use stays within a steady band. The 90 day threshold is a spitball; this should be made configurable for the community's needs. I've also hoisted expiry out into the `app` classes, to reduce the amount of non-database work repo types are doing. This should make it easier to make expiry configurable later on. Includes incidental cleanup and style changes. --- ...aed700404185eb71f113b18d581b50d2c4c7d0462438a71e5f1d.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .sqlx/query-61ebab676719aed700404185eb71f113b18d581b50d2c4c7d0462438a71e5f1d.json (limited to '.sqlx') diff --git a/.sqlx/query-61ebab676719aed700404185eb71f113b18d581b50d2c4c7d0462438a71e5f1d.json b/.sqlx/query-61ebab676719aed700404185eb71f113b18d581b50d2c4c7d0462438a71e5f1d.json new file mode 100644 index 0000000..9edc1af --- /dev/null +++ b/.sqlx/query-61ebab676719aed700404185eb71f113b18d581b50d2c4c7d0462438a71e5f1d.json @@ -0,0 +1,12 @@ +{ + "db_name": "SQLite", + "query": "\n delete from message\n where sent_at < $1\n ", + "describe": { + "columns": [], + "parameters": { + "Right": 1 + }, + "nullable": [] + }, + "hash": "61ebab676719aed700404185eb71f113b18d581b50d2c4c7d0462438a71e5f1d" +} -- cgit v1.2.3