mirror of
https://github.com/OpenFusionProject/OpenFusion.git
synced 2024-11-14 10:20:05 +00:00
Gent Semaj
a6eb0e2349
* Auth cookie support * Add config option for auth cookie support * Safe handling of TEGid/auth_id strings * Fix bad size calculation due to pointer cast * Expiration timestamp instead of valid bit * Change setting to "allowed auth methods" This allows plaintext password auth to be disabled altogether * PR feedback
19 lines
636 B
SQL
19 lines
636 B
SQL
/*
|
|
It is recommended in the SQLite manual to turn off
|
|
foreign keys when making schema changes that involve them
|
|
*/
|
|
PRAGMA foreign_keys=OFF;
|
|
BEGIN TRANSACTION;
|
|
-- New table to store auth cookies
|
|
CREATE TABLE Auth (
|
|
AccountID INTEGER NOT NULL,
|
|
Cookie TEXT NOT NULL,
|
|
Expires INTEGER DEFAULT 0 NOT NULL,
|
|
FOREIGN KEY(AccountID) REFERENCES Accounts(AccountID) ON DELETE CASCADE,
|
|
UNIQUE (AccountID)
|
|
);
|
|
-- Update DB Version
|
|
UPDATE Meta SET Value = 5 WHERE Key = 'DatabaseVersion';
|
|
UPDATE Meta SET Value = strftime('%s', 'now') WHERE Key = 'LastMigration';
|
|
COMMIT;
|
|
PRAGMA foreign_keys=ON; |