summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/database.pm
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2019-04-30 12:08:51 +0200
committerDaniel Friesel <derf@finalrewind.org>2019-04-30 12:08:51 +0200
commit867a5d4afbb3a5c0ad0e5dfbc10d2516e3e9123f (patch)
tree13830d604e23ed647c874bd201ec999eeb37585b /lib/Travelynx/Command/database.pm
parent4ad1a1d20e52f7aa4b1ae2b7cc84c83c584d6725 (diff)
allow users to change their mail address0.19
Closes #6
Diffstat (limited to 'lib/Travelynx/Command/database.pm')
-rw-r--r--lib/Travelynx/Command/database.pm21
1 files changed, 20 insertions, 1 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm
index 62a470c..be5db72 100644
--- a/lib/Travelynx/Command/database.pm
+++ b/lib/Travelynx/Command/database.pm
@@ -378,7 +378,7 @@ my @migrations = (
},
# v6 -> v7
- # Add password_reset table to store data about pending password resets
+ # Add pending_passwords table to store data about pending password resets
sub {
my ($db) = @_;
$db->query(
@@ -393,6 +393,25 @@ my @migrations = (
}
);
},
+
+ # v7 -> v8
+ # Add pending_mails table to store data about pending mail changes
+ sub {
+ my ($db) = @_;
+ $db->query(
+ qq{
+ alter table pending_mails rename to mail_blacklist;
+ create table pending_mails (
+ user_id integer not null references users (id) primary key,
+ email varchar(256) not null,
+ token varchar(80) not null,
+ requested_at timestamptz not null
+ );
+ comment on table pending_mails is 'Verification tokens for mail address changes';
+ update schema_version set version = 8;
+ }
+ );
+ },
);
sub setup_db {