Path : /home/vishqocm/pcib.in/
File Upload :
Current File : /home/vishqocm////pcib.in/create_unified_certificates_table.sql

CREATE TABLE IF NOT EXISTS `unified_certificates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `enrollment_id` int(11) NOT NULL,
  `student_exam_id` int(11) NULL,
  `course_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `certificate_number` varchar(50) NOT NULL,
  `verification_code` varchar(50) NOT NULL,
  `certificate_data` text,
  `issue_date` date NOT NULL,
  `payment_status` enum('pending','paid','completed') NOT NULL DEFAULT 'pending',
  `payment_date` datetime DEFAULT NULL,
  `payment_reference` varchar(100) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `certificate_number` (`certificate_number`),
  UNIQUE KEY `verification_code` (`verification_code`),
  KEY `enrollment_id` (`enrollment_id`),
  KEY `student_exam_id` (`student_exam_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;