summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/database.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2022-02-14 21:58:30 +0100
committerDaniel Friesel <derf@finalrewind.org>2022-02-14 21:58:30 +0100
commitfaf8952b8732d6314e3d3429f5cc761564565e44 (patch)
tree0247aa13ee6f06f33f53b848503d1e0fb42ce884 /lib/Travelynx/Command/database.pm
parent6fc21cac41e3b1bf4a6484fed736aec27b340b63 (diff)
Send inactivity notification prior to account deletion
Diffstat (limited to 'lib/Travelynx/Command/database.pm')
-rw-r--r--lib/Travelynx/Command/database.pm14
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm
index 4f7c792..eb2443c 100644
--- a/lib/Travelynx/Command/database.pm
+++ b/lib/Travelynx/Command/database.pm
@@ -1,4 +1,5 @@
package Travelynx::Command::database;
+
# Copyright (C) 2020 Daniel Friesel
#
# SPDX-License-Identifier: AGPL-3.0-or-later
@@ -1055,6 +1056,19 @@ my @migrations = (
}
);
},
+
+ # v23 -> v24
+ # travelynx 1.22 warns about upcoming account deletion due to inactivity
+ sub {
+ my ($db) = @_;
+ $db->query(
+ qq{
+ alter table users add column deletion_notified timestamptz;
+ comment on column users.deletion_notified is 'Time at which warning about upcoming account deletion due to inactivity was sent';
+ update schema_version set version = 24;
+ }
+ );
+ },
);
sub setup_db {