This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE IF NOT EXISTS employees( | |
id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, | |
name VARCHAR(255) NOT NULL | |
); | |
CREATE TABLE employee_attendance( | |
employee_id BIGINT UNSIGNED NOT NULL, | |
date VARCHAR(10) NOT NULL, | |
status ENUM('presence', 'absence'), | |
FOREIGN KEY (employee_id) REFERENCES employees(id) ON UPDATE CASCADE ON DELETE CASCADE | |
); | |
CREATE TABLE employee_rfid( | |
employee_id BIGINT UNSIGNED NOT NULL, | |
rfid_serial VARCHAR(11), | |
FOREIGN KEY (employee_id) REFERENCES employees(id) ON UPDATE CASCADE ON DELETE CASCADE | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment