mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-12-22 11:20:05 +00:00
Add LastPasswordReset timestamp column, missing DB version bump
This commit is contained in:
parent
cd4e7ee159
commit
7dc43ddd6f
@ -1,4 +1,8 @@
|
|||||||
BEGIN TRANSACTION;
|
BEGIN TRANSACTION;
|
||||||
-- New Column
|
-- New Columns
|
||||||
ALTER TABLE Accounts ADD Email TEXT DEFAULT '' NOT NULL;
|
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;
|
COMMIT;
|
||||||
|
@ -1,15 +1,16 @@
|
|||||||
CREATE TABLE IF NOT EXISTS Accounts (
|
CREATE TABLE IF NOT EXISTS Accounts (
|
||||||
AccountID INTEGER NOT NULL,
|
AccountID INTEGER NOT NULL,
|
||||||
Login TEXT NOT NULL UNIQUE COLLATE NOCASE,
|
Login TEXT NOT NULL UNIQUE COLLATE NOCASE,
|
||||||
Password TEXT NOT NULL,
|
Password TEXT NOT NULL,
|
||||||
Selected INTEGER DEFAULT 1 NOT NULL,
|
Selected INTEGER DEFAULT 1 NOT NULL,
|
||||||
AccountLevel INTEGER NOT NULL,
|
AccountLevel INTEGER NOT NULL,
|
||||||
Created INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
Created INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||||
LastLogin INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
LastLogin INTEGER DEFAULT (strftime('%s', 'now')) NOT NULL,
|
||||||
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,
|
Email TEXT DEFAULT '' NOT NULL,
|
||||||
|
LastPasswordReset INTEGER DEFAULT 0 NOT NULL,
|
||||||
PRIMARY KEY(AccountID AUTOINCREMENT)
|
PRIMARY KEY(AccountID AUTOINCREMENT)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user