Skip to content

Commit

Permalink
Update HISTORY.md and refresh schema files/doc
Browse files Browse the repository at this point in the history
  • Loading branch information
KarlLevik committed Aug 31, 2021
1 parent cb38894 commit 3cb031a
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 8 deletions.
18 changes: 17 additions & 1 deletion HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ History
Unreleased / master
-------------------

1.26.0 (2021-08-31)
-------------------

Column changes:

* Add a source column to the PDB table

Stored procedure changes:

* New stored procedure ``update_dewar_comments_json_merge`` to JSON merge the Dewar comments with a parameter
* Add 'plan' prefix to new DCPlan column aliases in ``retrieve_scm_sample*`` stored procedures (bug)

Lookup table data changes:

* Fill in some missing properties for container types


1.25.1 (2021-07-28)
-------------------

Expand All @@ -23,7 +40,6 @@ New versions of stored procedures:
* ``upsert_particle_classification_v2`` - new parameter ``p_classDistribution``



1.24.0 (2021-07-23)
-------------------

Expand Down
10 changes: 10 additions & 0 deletions docs/list_of_procs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,21 @@
For insert: p_particlePickerId
For update: p_id
Returns: Record ID in p_id."
"**upsert_particle_classification_v2**", "INOUT p_id int unsigned, p_particleClassificationGroupId int unsigned, p_classNumber int unsigned, p_classImageFullPath varchar(255), p_particlesPerClass int unsigned, p_classDistribution float, p_rotationAccuracy float, p_translationAccuracy float, p_estimatedResolution float, p_overallFourierCompleteness float", "Inserts or updates info about a particle classification (p_id).
Mandatory columns:
For insert: p_particleClassificationGroupId
For update: p_id
Returns: Record ID in p_id."
"**upsert_particle_picker**", "INOUT p_id int(11) unsigned, p_firstMotionCorrectionId int(11) unsigned, p_programId int(11) unsigned, p_particlePickingTemplate varchar(255), p_particleDiameter float, p_numberOfParticles int unsigned", "Inserts or updates info about a particle picker (p_id).
Mandatory columns:
For insert: p_firstMotionCorrectionId
For update: p_id
Returns: Record ID in p_id."
"**upsert_particle_picker_v2**", "INOUT p_id int(11) unsigned, p_firstMotionCorrectionId int(11) unsigned, p_programId int(11) unsigned, p_particlePickingTemplate varchar(255), p_particleDiameter float, p_numberOfParticles int unsigned, p_summaryImageFullPath varchar(255)", "Inserts or updates info about a particle picker (p_id).
Mandatory columns:
For insert: p_firstMotionCorrectionId
For update: p_id
Returns: Record ID in p_id."
"**upsert_person**", "INOUT p_id int(10) unsigned, p_laboratoryId int(10) unsigned, p_familyName varchar(100), p_givenName varchar(45), p_title varchar(45), p_emailAddress varchar(60), p_phoneNumber varchar(45), p_login varchar(45), p_externalPkId int(11) unsigned, p_externalPkUUID varchar(32)", "Inserts or updates info about a person (p_id).
Mandatory columns:
For insert: login
Expand Down
8 changes: 4 additions & 4 deletions schemas/ispyb/lookups.sql

Large diffs are not rendered by default.

38 changes: 36 additions & 2 deletions schemas/ispyb/routines.sql
Original file line number Diff line number Diff line change
Expand Up @@ -7608,6 +7608,40 @@ DELIMITER ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `update_dewar_comments_json_merge` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE PROCEDURE `update_dewar_comments_json_merge`(
IN p_id int(10) unsigned,
p_comments JSON
)
MODIFIES SQL DATA
COMMENT 'Merges in additional JSON into the comments column on a dewar/parcel (p_id).\nMandatory columns: p_id \nReturns: Nothing'
BEGIN
IF p_id IS NOT NULL THEN
IF JSON_VALID(p_comments) THEN
UPDATE Dewar
SET comments = JSON_MERGE_PRESERVE(IFNULL(comments, '{}'), p_comments)
WHERE dewarId = p_id;
ELSE
SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=1644, MESSAGE_TEXT='Mandatory argument p_comments is invalid JSON';
END IF;
ELSE
SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=1644, MESSAGE_TEXT='Mandatory argument p_id is NULL';
END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `update_processing_program_for_id_range` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
Expand Down Expand Up @@ -11166,7 +11200,7 @@ DELIMITER ;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-07-28 12:13:38
-- Dump completed on 2021-08-31 16:30:17
-- MariaDB dump 10.19 Distrib 10.5.10-MariaDB, for Linux (x86_64)
--
-- Host: 10.88.0.5 Database: ispyb_build
Expand Down Expand Up @@ -11213,4 +11247,4 @@ DELIMITER ;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-07-28 12:13:38
-- Dump completed on 2021-08-31 16:30:17
3 changes: 2 additions & 1 deletion schemas/ispyb/tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -3150,6 +3150,7 @@ CREATE TABLE `PDB` (
`name` varchar(255) DEFAULT NULL,
`contents` mediumtext DEFAULT NULL,
`code` varchar(4) DEFAULT NULL,
`source` varchar(30) DEFAULT NULL COMMENT 'Could be e.g. AlphaFold or RoseTTAFold',
PRIMARY KEY (`pdbId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;
Expand Down Expand Up @@ -6127,4 +6128,4 @@ CREATE TABLE `zc_ZocaloBuffer` (
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2021-07-23 18:38:10
-- Dump completed on 2021-08-31 11:30:55

0 comments on commit 3cb031a

Please sign in to comment.