Files
dynasqy/database/migration_absences.sql
T
2026-08-23 09:04:47 +00:00

11 lines
401 B
SQL

CREATE TABLE IF NOT EXISTS absences (
id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
membre_id INT UNSIGNED NOT NULL,
date_absence DATE NOT NULL,
motif VARCHAR(255) DEFAULT NULL,
created_by INT UNSIGNED NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
FOREIGN KEY (membre_id) REFERENCES users(id) ON DELETE CASCADE,
FOREIGN KEY (created_by) REFERENCES users(id)
) ENGINE=InnoDB;