Add tables to track logs of user actions such as login attempts, failed logins, and critical changes (e.g., updating 2FA settings, wallet addresses, or sensitive account information).
Example:
CREATE TABLE user_actions (
id INT AUTO_INCREMENT PRIMARY KEY,
user_id INT NOT NULL,
action VARCHAR(255),
action_details JSON,
created_at DATETIME DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE
);
Add tables to track logs of user actions such as login attempts, failed logins, and critical changes (e.g., updating 2FA settings, wallet addresses, or sensitive account information).
Example: