mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-12-04 19:52:49 +00:00
Add Email and LastPasswordReset columns to Account table (#299)
* Add Email column to Account table * Add LastPasswordReset timestamp column, missing DB version bump
This commit is contained in:
parent
ed9fe61faf
commit
36e0667ed2
8
sql/migration5.sql
Normal file
8
sql/migration5.sql
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
BEGIN TRANSACTION;
|
||||||
|
-- New Columns
|
||||||
|
ALTER TABLE Accounts ADD Email TEXT DEFAULT '' NOT NULL;
|
||||||
|
ALTER TABLE Accounts ADD LastPasswordReset INTEGER DEFAULT 0 NOT NULL;
|
||||||
|
-- Update DB Version
|
||||||
|
UPDATE Meta SET Value = 6 WHERE Key = 'DatabaseVersion';
|
||||||
|
UPDATE Meta SET Value = strftime('%s', 'now') WHERE Key = 'LastMigration';
|
||||||
|
COMMIT;
|
@ -9,6 +9,8 @@ CREATE TABLE IF NOT EXISTS Accounts (
|
|||||||
BannedUntil INTEGER DEFAULT 0 NOT NULL,
|
BannedUntil INTEGER DEFAULT 0 NOT NULL,
|
||||||
BannedSince INTEGER DEFAULT 0 NOT NULL,
|
BannedSince INTEGER DEFAULT 0 NOT NULL,
|
||||||
BanReason TEXT DEFAULT '' NOT NULL,
|
BanReason TEXT DEFAULT '' NOT NULL,
|
||||||
|
Email TEXT DEFAULT '' NOT NULL,
|
||||||
|
LastPasswordReset INTEGER DEFAULT 0 NOT NULL,
|
||||||
PRIMARY KEY(AccountID AUTOINCREMENT)
|
PRIMARY KEY(AccountID AUTOINCREMENT)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#define DATABASE_VERSION 5
|
#define DATABASE_VERSION 6
|
||||||
|
|
||||||
namespace Database {
|
namespace Database {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user