Add LastPasswordReset timestamp column, missing DB version bump

This commit is contained in:
Gent Semaj 2024-11-26 21:21:35 -05:00
parent cd4e7ee159
commit 7dc43ddd6f
Signed by untrusted user: ycc
GPG Key ID: 2D76C57BF6BEADC4
2 changed files with 17 additions and 12 deletions

View File

@ -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;

View File

@ -10,6 +10,7 @@ CREATE TABLE IF NOT EXISTS Accounts (
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)
); );