CREATE TABLE IF NOT EXISTS attendance ( id INT AUTO_INCREMENT PRIMARY KEY, student_id INT NOT NULL, attendance_date DATE NOT NULL, status ENUM('present', 'absent', 'late') NOT NULL, FOREIGN KEY (student_id) REFERENCES users(id) );