14 lines
527 B
SQL
14 lines
527 B
SQL
CREATE TABLE IF NOT EXISTS `leave_requests` (
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
`student_id` int(11) NOT NULL,
|
|
`leave_type` varchar(255) NOT NULL,
|
|
`start_date` date NOT NULL,
|
|
`end_date` date NOT NULL,
|
|
`reason` text NOT NULL,
|
|
`attachment_path` varchar(255) DEFAULT NULL,
|
|
`status` varchar(255) NOT NULL DEFAULT 'pending',
|
|
`created_at` timestamp NOT NULL DEFAULT current_timestamp(),
|
|
PRIMARY KEY (`id`),
|
|
KEY `student_id` (`student_id`)
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|