/* (!) The script must be run with resetted index counters*/

INSERT INTO `variations` (`modified`,`name`,`description`,`comment`) VALUES (NULL,'default', 'The default variation', 'This variations is used by default if no variation is specified');
INSERT INTO `variations` (`modified`,`name`,`description`,`comment`) VALUES (NULL,'mc', 'Monte-carlo variation', 'This variations should be used for monte-carlo reconstruction');
INSERT INTO `variations` (`modified`,`name`,`description`,`comment`) VALUES (NULL,'jhon', 'Variation by Jhon norrice', 'This variations is used by default if no variation is specified');

#create directories
INSERT INTO `directories` (`modified`,`name`, `parentId`, `comment`) VALUES (NULL,'CDC', NULL, 'comment');
INSERT INTO `directories` (`modified`,`name`, `parentId`, `comment`) VALUES (NULL,'FDC', NULL, 'comment');
INSERT INTO `directories` (`modified`,`name`, `parentId`, `comment`) VALUES (NULL,'subf', '1', NULL);

#create runranges
INSERT INTO `runRanges` (`modified`,`runMin`, `runMax`, `name`, `comment`) VALUES ( NULL,0, 1000, '', NULL);
INSERT INTO `runRanges` (`modified`,`runMin`, `runMax`, `name`, `comment`) VALUES ( NULL,1001, 2000, 'calruns', NULL);
INSERT INTO `runRanges` (`modified`,`runMin`, `runMax`, `name`, `comment`) VALUES ( NULL,500, 2000, '', NULL);

#create data type table
INSERT INTO `constantTypes` (`modified`,`directoryId`,`name`,`nRows`,`nColumns`,`comments`) VALUES ( NULL,3, 'cal_momentum', 1, 4, "test values");
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'x', 'double', 1,0);
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'y', 'double', 1,1);
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'z', 'double', 1,2);
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'm', 'double', 1,3);

INSERT INTO `constantTypes` (`directoryId`, `name`, `nRows`,`nColumns`,`comments`) VALUES ( 1,'adc1', 2, 3, "test values");
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'v1', 'double', 2,0);
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'v2', 'double', 2,1);
INSERT INTO `columns` (`modified`,`name`, `columnType`,`typeId`,`order`) VALUES (NULL, 'v3', 'double', 2,2);

#ok! Now asignment 1
INSERT INTO `constantSets` (`modified`,`vault`,`constantTypeId`) VALUES (NULL, '10.23|15.23|100.23|1.1175', 1);
INSERT INTO `assignments` (`modified`,`variationId`, `runRangeId`, `eventRangeId`, `constantSetId`, `comment`) VALUES (NULL,1, 1, NULL, 1, NULL);

INSERT INTO `constantSets` (`modified`,`vault`,`constantTypeId`) VALUES ( NULL,'0.23|5.23|90.23|0.1175', 1);
INSERT INTO `assignments` (`modified`,`variationId`, `runRangeId`, `eventRangeId`, `constantSetId`, `comment`) VALUES (NULL,1, 1, NULL, 2, NULL);

INSERT INTO `constantSets` (`modified`,`vault`,`constantTypeId`) VALUES (NULL, '20.23|25.23|200.23|2.1175', 1);
INSERT INTO `assignments` (`modified`,`variationId`, `runRangeId`, `eventRangeId`, `constantSetId`, `comment`) VALUES (NULL,3, 3, NULL, 3, NULL);


