ChatGPT's update to harden software and run db updates.

This commit is contained in:
2026-10-21 06:53:45 -04:00
parent 1e63076123
commit acc8cb70f5
171 changed files with 9325 additions and 404 deletions
+20
View File
@@ -0,0 +1,20 @@
CREATE TABLE IF NOT EXISTS user_mfa (
user_serial BIGINT UNSIGNED NOT NULL PRIMARY KEY,
secret_cipher TEXT NOT NULL,
last_counter BIGINT NOT NULL DEFAULT -1,
FOREIGN KEY (user_serial) REFERENCES users(user_serial) ON DELETE CASCADE
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS mfa_recovery (
user_serial BIGINT UNSIGNED NOT NULL,
code_hash CHAR(64) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
PRIMARY KEY(user_serial,code_hash),
FOREIGN KEY (user_serial) REFERENCES users(user_serial) ON DELETE CASCADE
) ENGINE=InnoDB;
CREATE TABLE IF NOT EXISTS club_resource_usage (
club_serial BIGINT UNSIGNED NOT NULL,
resource_name VARCHAR(32) NOT NULL,
window_started DATETIME NOT NULL,
used_count INT UNSIGNED NOT NULL,
PRIMARY KEY(club_serial,resource_name),
FOREIGN KEY (club_serial) REFERENCES clubs(club_serial) ON DELETE RESTRICT
) ENGINE=InnoDB;