Skip to content

Commit

Permalink
Update database sql files
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlLevik authored and github-actions[bot] committed Sep 4, 2024
1 parent d41bfca commit 41dc166
Show file tree
Hide file tree
Showing 4 changed files with 207 additions and 203 deletions.
9 changes: 6 additions & 3 deletions schemas/ispyb/data.sql
Original file line number Diff line number Diff line change
Expand Up @@ -211,9 +211,9 @@ INSERT INTO `BLSample` (`blSampleId`, `diffractionPlanId`, `crystalId`, `contain
/*!40000 ALTER TABLE `BLSample` ENABLE KEYS */;

/*!40000 ALTER TABLE `BLSampleGroup` DISABLE KEYS */;
INSERT INTO `BLSampleGroup` (`blSampleGroupId`, `name`, `proposalId`) VALUES (5,NULL,37027),
(6,'foo',37027),
(7,'bar',37027);
INSERT INTO `BLSampleGroup` (`blSampleGroupId`, `name`, `proposalId`, `ownerId`) VALUES (5,NULL,37027,NULL),
(6,'foo',37027,NULL),
(7,'bar',37027,NULL);
/*!40000 ALTER TABLE `BLSampleGroup` ENABLE KEYS */;

/*!40000 ALTER TABLE `BLSampleGroup_has_BLSample` DISABLE KEYS */;
Expand Down Expand Up @@ -633,6 +633,9 @@ INSERT INTO `Position` (`positionId`, `relativePositionId`, `posX`, `posY`, `pos
/*!40000 ALTER TABLE `PreparePhasingData` DISABLE KEYS */;
/*!40000 ALTER TABLE `PreparePhasingData` ENABLE KEYS */;

/*!40000 ALTER TABLE `ProcessedTomogram` DISABLE KEYS */;
/*!40000 ALTER TABLE `ProcessedTomogram` ENABLE KEYS */;

/*!40000 ALTER TABLE `ProcessingJob` DISABLE KEYS */;
INSERT INTO `ProcessingJob` (`processingJobId`, `dataCollectionId`, `displayName`, `comments`, `recordTimestamp`, `recipe`, `automatic`) VALUES (5,1002287,'test job 01','Testing the job submission system','2017-10-16 11:02:12','DIALS/xia2',0);
/*!40000 ALTER TABLE `ProcessingJob` ENABLE KEYS */;
Expand Down
3 changes: 2 additions & 1 deletion schemas/ispyb/lookups.sql
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,8 @@ INSERT INTO `SchemaStatus` (`schemaStatusId`, `scriptName`, `schemaStatus`, `rec
(292,'2024_07_16_ContainerType_insert_new.sql','DONE','2024-08-14 11:23:41'),
(293,'2024_08_08_ProcessedTomogram.sql','DONE','2024-08-14 11:23:41'),
(294,'2024_08_14_AdminVar_bump_version.sql','DONE','2024-08-14 11:23:41'),
(295,'2024_08_19_AdminVar_bump_version.sql','DONE','2024-08-19 12:17:10');
(295,'2024_08_19_AdminVar_bump_version.sql','DONE','2024-08-19 12:17:10'),
(296,'2024_09_04_ProcessedTomogram_comment','ONGOING','2024-09-04 15:33:17');
/*!40000 ALTER TABLE `SchemaStatus` ENABLE KEYS */;

/*!40000 ALTER TABLE `ComponentType` DISABLE KEYS */;
Expand Down
6 changes: 3 additions & 3 deletions schemas/ispyb/routines.sql
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ DELIMITER ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
DELIMITER ;;
CREATE FUNCTION `retrieve_proposal_title`(p_proposal_code varchar(5), p_proposal_number int) RETURNS varchar(255) CHARSET latin1
CREATE FUNCTION `retrieve_proposal_title`(p_proposal_code varchar(5), p_proposal_number int) RETURNS varchar(255) CHARSET latin1 COLLATE latin1_swedish_ci
READS SQL DATA
BEGIN
DECLARE ret_title varchar(255);
Expand All @@ -155,7 +155,7 @@ DELIMITER ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
DELIMITER ;;
CREATE FUNCTION `retrieve_proposal_title_v2`(p_proposalCode varchar(5), p_proposalNumber int) RETURNS varchar(255) CHARSET latin1
CREATE FUNCTION `retrieve_proposal_title_v2`(p_proposalCode varchar(5), p_proposalNumber int) RETURNS varchar(255) CHARSET latin1 COLLATE latin1_swedish_ci
READS SQL DATA
COMMENT 'Retrieve the title for a given proposal code and number.'
BEGIN
Expand Down Expand Up @@ -206,7 +206,7 @@ DELIMITER ;
/*!50003 SET character_set_results = utf8mb3 */ ;
/*!50003 SET collation_connection = utf8mb3_general_ci */ ;
DELIMITER ;;
CREATE FUNCTION `root_replace`(p_str varchar(255), p_oldroot varchar(255), p_newroot varchar(255)) RETURNS varchar(255) CHARSET latin1
CREATE FUNCTION `root_replace`(p_str varchar(255), p_oldroot varchar(255), p_newroot varchar(255)) RETURNS varchar(255) CHARSET latin1 COLLATE latin1_swedish_ci
COMMENT 'Returns a varchar where the old root p_oldroot (the leftmost part) of p_str has been replaced with a new root p_newroot'
BEGIN
DECLARE path_len smallint unsigned DEFAULT LENGTH(p_oldroot);
Expand Down
Loading

0 comments on commit 41dc166

Please sign in to comment.