diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-01-09 17:28:31 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-01-09 17:28:31 -0500 |
commit | 26e3996014936268f4acbfa214fa881af9320ddd (patch) | |
tree | 5f7fa2c1b73e4443ce75e8919383bdf775492304 /app/Schema/Sqlite.php | |
parent | 03032c3190a27408d60e27f486a4ca472448e9dc (diff) |
Add forgot password feature
Diffstat (limited to 'app/Schema/Sqlite.php')
-rw-r--r-- | app/Schema/Sqlite.php | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index f430c00b..f1be0cf1 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,25 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 92; +const VERSION = 93; + +function version_93(PDO $pdo) +{ + $pdo->exec(" + CREATE TABLE password_reset ( + token TEXT PRIMARY KEY, + user_id INTEGER NOT NULL, + date_expiration INTEGER NOT NULL, + date_creation INTEGER NOT NULL, + ip TEXT NOT NULL, + user_agent TEXT NOT NULL, + is_active INTEGER NOT NULL, + FOREIGN KEY(user_id) REFERENCES users(id) ON DELETE CASCADE + ) + "); + + $pdo->exec("INSERT INTO settings VALUES ('password_reset', '1')"); +} function version_92(PDO $pdo) { |