Sindbad~EG File Manager
-- Two-Factor Authentication Table
-- Run this SQL to add 2FA support to the system
CREATE TABLE IF NOT EXISTS `two_factor_codes` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`code` varchar(6) NOT NULL,
`expires_at` datetime NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
KEY `expires_at` (`expires_at`),
CONSTRAINT `fk_2fa_user` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- Clean up expired codes (can be run periodically)
-- DELETE FROM two_factor_codes WHERE expires_at < NOW();
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists