Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,27 @@ History
Unreleased / master
-------------------

4.6.0 (2025-03-06)
-------------------

New columns:

- Add a ``dewarRegistryId`` FK to the ``Dewar`` table

Data in lookup tables:

- Add 'Atlas' experiment type

Stored procedures:

- Remove superfluous commit in procedure ``upsert_processing_program``
- New procedure ``upsert_processing_program_v2`` with additional param for pipeline ID

Permissions:

- Add ``SELECT`` grant for Expeye role on table ``AutoProcIntegration``
- Add ``EXECUTE`` grant for processing role on new procedure ``upsert_processing_program_v2``

4.5.0 (2025-02-25)
-------------------

Expand Down
10 changes: 7 additions & 3 deletions schemas/ispyb/lookups.sql
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

/*!40000 ALTER TABLE `AdminVar` DISABLE KEYS */;
INSERT INTO `AdminVar` (`varId`, `name`, `value`) VALUES (4,'schemaVersion','4.5.0');
INSERT INTO `AdminVar` (`varId`, `name`, `value`) VALUES (4,'schemaVersion','4.6.0');
/*!40000 ALTER TABLE `AdminVar` ENABLE KEYS */;

/*!40000 ALTER TABLE `SchemaStatus` DISABLE KEYS */;
Expand Down Expand Up @@ -275,7 +275,10 @@ INSERT INTO `SchemaStatus` (`schemaStatusId`, `scriptName`, `schemaStatus`, `rec
(303,'2025_01_24_Tomogram_gridSquare.sql','DONE','2025-01-29 10:29:27'),
(304,'2025_01_29_AdminVar_bump_version.sql','DONE','2025-01-29 10:29:27'),
(305,'2025_02_14_BLSession_purgedProcessedData.sql','DONE','2025-02-25 15:51:29'),
(306,'2025_02_25_AdminVar_bump_version.sql','DONE','2025-02-25 15:51:30');
(306,'2025_02_25_AdminVar_bump_version.sql','DONE','2025-02-25 15:51:30'),
(307,'2025_02_27_ExperimentType_atlas.sql','DONE','2025-03-06 11:58:07'),
(308,'2025_03_05_Dewar_dewarRegistryId.sql','DONE','2025-03-06 11:58:07'),
(309,'2025_03_06_AdminVar_bump_version.sql','DONE','2025-03-06 11:58:07');
/*!40000 ALTER TABLE `SchemaStatus` ENABLE KEYS */;

/*!40000 ALTER TABLE `ComponentType` DISABLE KEYS */;
Expand Down Expand Up @@ -392,7 +395,8 @@ INSERT INTO `ExperimentType` (`experimentTypeId`, `name`, `proposalType`, `activ
(40,'Still','mx',1),
(41,'SSX-Chip','mx',1),
(42,'SSX-Jet','mx',1),
(43,'Metal ID','mx',1);
(43,'Metal ID','mx',1),
(44,'Atlas','em',1);
/*!40000 ALTER TABLE `ExperimentType` ENABLE KEYS */;

/*!40000 ALTER TABLE `InspectionType` DISABLE KEYS */;
Expand Down
3 changes: 3 additions & 0 deletions schemas/ispyb/tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1614,12 +1614,15 @@ CREATE TABLE `Dewar` (
`extra` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'JSON column for facility-specific or hard-to-define attributes, e.g. LN2 top-ups and contents checks' CHECK (json_valid(`extra`)),
`source` varchar(50) DEFAULT current_user(),
`externalShippingIdFromSynchrotron` int(11) unsigned DEFAULT NULL COMMENT 'ID for shipping from synchrotron in external application',
`dewarRegistryId` int(11) unsigned DEFAULT NULL COMMENT 'Reference to the registered dewar i.e. the physical item',
PRIMARY KEY (`dewarId`),
UNIQUE KEY `barCode` (`barCode`),
KEY `Dewar_FKIndex1` (`shippingId`),
KEY `Dewar_FKIndex2` (`firstExperimentId`),
KEY `Dewar_FKIndexCode` (`code`),
KEY `Dewar_FKIndexStatus` (`dewarStatus`),
KEY `Dewar_fk_dewarRegistryId` (`dewarRegistryId`),
CONSTRAINT `Dewar_fk_dewarRegistryId` FOREIGN KEY (`dewarRegistryId`) REFERENCES `DewarRegistry` (`dewarRegistryId`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Dewar_fk_firstExperimentId` FOREIGN KEY (`firstExperimentId`) REFERENCES `BLSession` (`sessionId`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `Dewar_ibfk_1` FOREIGN KEY (`shippingId`) REFERENCES `Shipping` (`shippingId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
Expand Down
5 changes: 5 additions & 0 deletions schemas/ispyb/updates/2025_03_06_AdminVar_bump_version.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
INSERT IGNORE INTO SchemaStatus (scriptName, schemaStatus) VALUES ('2025_03_06_AdminVar_bump_version.sql', 'ONGOING');

UPDATE AdminVar SET `value` = '4.6.0' WHERE `name` = 'schemaVersion';

UPDATE SchemaStatus SET schemaStatus = 'DONE' WHERE scriptName = '2025_03_06_AdminVar_bump_version.sql';