/******************Kishan June 11, 2018 ***********************/

delete t1 from revaluation_marks_finalized t1, revaluation_marks_finalized t2 where t1.id < t2.id AND t1.examID = t2.examID and t1.studentID = t2.studentID and t1.mark = t2.mark and t1.staffID = t2.staffID and t1.adminID = t2.adminID and t1.exam_revaluation_id = t2.exam_revaluation_id;
ALTER TABLE revaluation_marks_finalized
ADD CONSTRAINT student_exam UNIQUE (studentID,examID);

ALTER TABLE `student_mark_before_moderation` 
ADD COLUMN `exam_revaluation_mark` INT(11) NULL AFTER `moderation_rule_id`;



/*Aswin 19-06-2018*/
create table question_paper_cognitive_levels (id int primary key auto_increment,levelName varchar(100),priority int);

insert into question_paper_cognitive_levels (levelName,priority) values ('create',6),('evaluate',5),('analyze',4),('applying',3),('comprehending',2),('knowledge',1);

create table question_paper_cognitive_levels_tags (id int primary key auto_increment,tagName varchar(100),question_paper_cognitive_levels_id int, constraint FK_question_paper_cognitive_level foreign key (question_paper_cognitive_levels_id) references question_paper_cognitive_levels(id));

alter table question_paper_assignments add column cognitiveLevels varchar(255) not null;

alter table question_paper_general_structure add column cognitiveLevels int;

alter table question_paper_pool add column cognitiveLevels int;

CREATE TABLE `tokenRegistrationReAdmission` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_registration_id` int(11) DEFAULT NULL,
  `batches_id` int(11) DEFAULT NULL,
  `semesters_id` int(11) DEFAULT NULL,
  `studentaccount_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

