/***********************Kishan March 31,2018 **********************/

CREATE TABLE `false_number_settings_master` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `shuffle_all_exams` INT(11) NULL DEFAULT 1,
  `false_no_total_range_from` INT(11) NULL DEFAULT 1000,
  `false_no_total_range_to` INT(11) NULL DEFAULT 9999,
  `false_no_numofdigits` INT(11) NULL DEFAULT 4,
  `false_no_to_present_students_only` INT(11) NULL DEFAULT 0,
  `false_no_prefix_setting` VARCHAR(100) NULL DEFAULT 'YEAR_AND_SEM',
  PRIMARY KEY (`id`),
  UNIQUE INDEX `id_UNIQUE` (`id` ASC));

  
  
  ALTER TABLE `false_number_settings_master` 
ADD COLUMN `createdBy` INT(11) NULL AFTER `false_no_prefix_setting`,
ADD COLUMN `createdDate` DATETIME NULL AFTER `createdBy`,
ADD COLUMN `updatedBy` INT(11) NULL AFTER `createdDate`,
ADD COLUMN `updatedDate` DATETIME NULL AFTER `updatedBy`;



CREATE TABLE `false_number_settings_examlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `shuffle_all_exams` int(11) DEFAULT '1',
  `false_no_total_range_from` int(11) DEFAULT '1000',
  `false_no_total_range_to` int(11) DEFAULT '9999',
  `false_no_numofdigits` int(11) DEFAULT '4',
  `false_no_to_present_students_only` int(11) DEFAULT '0',
  `false_no_prefix_setting` varchar(100) DEFAULT 'YEAR_AND_SEM',
  `exam_registration_id` int(11) NOT NULL,
  `exam_supplementary_id` int(11) NOT NULL,
  `createdBy` int(11) DEFAULT NULL,
  `createdDate` datetime DEFAULT NULL,
  `updatedBy` int(11) DEFAULT NULL,
  `updatedDate` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_UNIQUE` (`id`)
) ENGINE=InnoDB;


ALTER TABLE `false_number_settings_examlog` 
ADD COLUMN `date_format` VARCHAR(50) NULL DEFAULT 'dd/mm/yy' AFTER `false_no_prefix_setting`;


ALTER TABLE `false_number_settings_master` 
ADD COLUMN `date_format` VARCHAR(50) NULL DEFAULT 'dd/mm/yy' AFTER `false_no_prefix_setting`;

/*Aswin 6-4-18*/
alter table false_number_settings_examlog modify column exam_registration_id int(11)  not null default 0;
alter table false_number_settings_examlog modify column exam_supplementary_id int(11) not null default 0;

/* Ranjith Balachandran 09 / 04 / 2018 **/

ALTER TABLE opencourse_appln_initiate ADD COLUMN publish INT DEFAULT 0;