ALTER TABLE `education_verse`.`programeligability` 
CHANGE COLUMN `programeligability` `programeligability` LONGTEXT NULL ;

CREATE TABLE `uploads_tarbiya` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `type` enum('document','video') NOT NULL,
  `file_path` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

ALTER TABLE `education_verse`.`assessments_configure` 
ADD COLUMN `subject_id` INT(11) NULL AFTER `update_date`;

ALTER TABLE `education_verse`.`assessments_configure` 
ADD COLUMN `component_id` INT(11) NULL AFTER `subject_id`;


-- Junaid Changes

-- When we add course there is subject fee Column which is not used now

SELECT * FROM education_verse.subject;

ALTER TABLE `lab_demo_marks` CHANGE `updatedate` `updatedate` DATE NULL DEFAULT NULL;

ALTER TABLE `quiz` CHANGE `question_file` `question_file` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;
ALTER TABLE `quiz` CHANGE `totalmarks` `totalmarks` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;

ALTER TABLE `attendence_mark` CHANGE `updatedate` `updatedate` DATE NULL DEFAULT NULL;

ALTER TABLE `quiz` CHANGE `update_date` `update_date` DATETIME(6) NULL DEFAULT NULL;

ALTER TABLE `project_presentation_marks` CHANGE `updatedate` `updatedate` DATE NULL DEFAULT NULL;

-- create a column in project presentation for file upload

ALTER TABLE `add_project_presentation` ADD `file_path` VARCHAR(255) NOT NULL AFTER `total_marks`;

---- Course folder mein agr aik b file select naa ho to screen crash kr rahi thi

ALTER TABLE `subject` CHANGE `update_date` `update_date` DATETIME(6) NULL DEFAULT NULL;
ALTER TABLE `subject` CHANGE `labcourseoutline` `labcourseoutline` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
ALTER TABLE `subject` CHANGE `course_outline` `course_outline` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL;
ALTER TABLE `subject` CHANGE `course_learning_objective` `course_learning_objective` VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL;

---- Course Folder table Query
CREATE TABLE education_verse.course_folder (
    id INT NOT NULL AUTO_INCREMENT,
    Stream VARCHAR(255),
    institute VARCHAR(255),
    affiliation_body VARCHAR(255),
    program VARCHAR(255),
    component VARCHAR(255),
    course VARCHAR(255),
    section VARCHAR(255),
    quiz_type ENUM('Auto', 'Manual'),
    best_quiz VARCHAR(255),
    average_quiz VARCHAR(255),
    worst_quiz VARCHAR(255),
    Assignment ENUM('Auto', 'Manual'),
    best_assignment VARCHAR(255),
    average_assignment VARCHAR(255),
    worst_assignment VARCHAR(255),
    Mid_Term ENUM('Auto', 'Manual'),
    paper_midterm VARCHAR(255),
    best_midterm VARCHAR(255),
    average_midterm VARCHAR(255),
    worst_midterm VARCHAR(255),
    Final_Term ENUM('Auto', 'Manual'),
    paper_finalterm VARCHAR(255),
    best_finalterm VARCHAR(255),
    average_finalterm VARCHAR(255),
    worst_finalterm VARCHAR(255),
    Attendance ENUM('Auto', 'Manual'),
    attendance_file VARCHAR(255),
    create_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    update_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
    PRIMARY KEY (id)
);

ALTER TABLE `education_verse`.`course_folder` 
ADD COLUMN `campus` VARCHAR(45) NULL DEFAULT NULL AFTER `update_date`;


ALTER TABLE `education_verse`.`course_folder` 
ADD COLUMN `timetable` VARCHAR(45) NULL DEFAULT NULL AFTER `campus`;













-- Scholarship and AID table 


-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Nov 07, 2023 at 10:30 AM
-- Server version: 10.4.28-MariaDB
-- PHP Version: 8.2.4

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `education_verse`
--

-- --------------------------------------------------------

--
-- Table structure for table `aid_scholarshipapply`
--

CREATE TABLE `aid_scholarshipapply` (
  `aid_scholarshipapply_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `filename1` varchar(255) NOT NULL,
  `path1` varchar(255) NOT NULL,
  `filename2` varchar(255) NOT NULL,
  `path2` varchar(255) NOT NULL,
  `filename3` varchar(255) NOT NULL,
  `path3` varchar(255) NOT NULL,
  `filename4` varchar(255) NOT NULL,
  `path4` varchar(255) NOT NULL,
  `filename5` varchar(255) NOT NULL,
  `path5` varchar(255) NOT NULL,
  `filename6` varchar(255) NOT NULL,
  `path6` varchar(255) NOT NULL,
  `typeofdocument` varchar(255) NOT NULL,
  `create_date` date NOT NULL,
  `update_date` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `aid_scholarshipapply`
--

INSERT INTO `aid_scholarshipapply` (`aid_scholarshipapply_id`, `user_id`, `filename1`, `path1`, `filename2`, `path2`, `filename3`, `path3`, `filename4`, `path4`, `filename5`, `path5`, `filename6`, `path6`, `typeofdocument`, `create_date`, `update_date`) VALUES
(1, 288, 'Application Form', 'dummy.pdf', 'A', 'dummy.pdf', 'B', 'dummy.pdf', 'C', 'dummy.pdf', 'D', 'dummy.pdf', 'E', '', 'Financial Aid', '2023-11-06', '0000-00-00'),
(2, 306, 'Application Form', '923690ee-eef1-4938-9dcd-34b70d09419c.jfif', 'A', '923690ee-eef1-4938-9dcd-34b70d09419c.jfif', 'B', '923690ee-eef1-4938-9dcd-34b70d09419c.jfif', 'C', '923690ee-eef1-4938-9dcd-34b70d09419c.jfif', 'D', '923690ee-eef1-4938-9dcd-34b70d09419c.jfif', 'E', '', 'Financial Aid', '2023-11-07', '0000-00-00');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `aid_scholarshipapply`
--
ALTER TABLE `aid_scholarshipapply`
  ADD PRIMARY KEY (`aid_scholarshipapply_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `aid_scholarshipapply`
--
ALTER TABLE `aid_scholarshipapply`
  MODIFY `aid_scholarshipapply_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;

drop table if exists fee_installments_aid_scholarship;
create table fee_installments_aid_scholarship (
id int primary key not null auto_increment,
user_id int,
fee_type varchar(255),
due_date varchar(255),
total_amount varchar(255),
fee_status enum('Paid', 'Unpaid'),
created_at timestamp,
updated_at timestamp null
);


-- Patches after deployment on server

ALTER TABLE `timetable` CHANGE `sunstart` `sunstart` TIME(6) NOT NULL;
ALTER TABLE `timetable` CHANGE `sunend` `sunend` TIME(6) NOT NULL;

ALTER TABLE `assessments_configure` ADD `assignmentno` INT(11) NOT NULL AFTER `Attendance`;
ALTER TABLE `assessments_configure` ADD `quizno` INT(11) NOT NULL AFTER `Assignments`;

ALTER TABLE campus DROP COLUMN campus_logo;

ALTER TABLE `education_verse`.`user` 
ADD COLUMN `profilepic` VARCHAR(255) NULL AFTER `status`;