Füge Unterstützung für IP-Sperre und verbessere die Anmeldefunktionalität hinzu; aktualisiere .gitignore, Dockerfile und Datenbankschema
This commit is contained in:
@@ -22,6 +22,7 @@ CREATE TABLE access_tokens (
|
||||
uuid CHAR(36) NOT NULL UNIQUE,
|
||||
expires_at DATETIME NULL,
|
||||
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
notes TEXT NULL,
|
||||
FOREIGN KEY (identity_id)
|
||||
REFERENCES identities(id)
|
||||
ON DELETE CASCADE
|
||||
@@ -53,3 +54,13 @@ CREATE TABLE files (
|
||||
REFERENCES access_tokens(id)
|
||||
ON DELETE SET NULL
|
||||
) ENGINE=InnoDB;
|
||||
|
||||
CREATE TABLE admin_login_attempts (
|
||||
id INT AUTO_INCREMENT PRIMARY KEY,
|
||||
ip_address VARCHAR(45) NOT NULL,
|
||||
attempts INT NOT NULL DEFAULT 1,
|
||||
locked_until DATETIME NULL,
|
||||
last_attempt TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
|
||||
UNIQUE KEY (ip_address)
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user