summaryrefslogtreecommitdiff
path: root/lib/Travelynx/Command/database.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Travelynx/Command/database.pm')
-rw-r--r--lib/Travelynx/Command/database.pm17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/Travelynx/Command/database.pm b/lib/Travelynx/Command/database.pm
index 393564b..62a470c 100644
--- a/lib/Travelynx/Command/database.pm
+++ b/lib/Travelynx/Command/database.pm
@@ -376,6 +376,23 @@ my @migrations = (
}
);
},
+
+ # v6 -> v7
+ # Add password_reset table to store data about pending password resets
+ sub {
+ my ($db) = @_;
+ $db->query(
+ qq{
+ create table pending_passwords (
+ user_id integer not null references users (id) primary key,
+ token varchar(80) not null,
+ requested_at timestamptz not null
+ );
+ comment on table pending_passwords is 'Password reset tokens';
+ update schema_version set version = 7;
+ }
+ );
+ },
);
sub setup_db {