diff --git a/schema/1_tables.sql b/schema/1_tables.sql index 1c388a2..bdffbed 100644 --- a/schema/1_tables.sql +++ b/schema/1_tables.sql @@ -1,8 +1,8 @@ --- MariaDB dump 10.19 Distrib 10.8.6-MariaDB, for Linux (x86_64) +-- MariaDB dump 10.19 Distrib 10.8.8-MariaDB, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: ispyb_build -- ------------------------------------------------------ --- Server version 10.8.6-MariaDB-1:10.8.6+maria~ubu2204 +-- Server version 10.8.8-MariaDB-1:10.8.8+maria~ubu2204 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -3784,6 +3784,49 @@ CREATE TABLE `SSXDataCollection` ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Extends DataCollection with SSX-specific fields.'; /*!40101 SET character_set_client = @saved_cs_client */; +-- +-- Table structure for table `SSXProcessingResult` +-- + +DROP TABLE IF EXISTS `SSXProcessingResult`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SSXProcessingResult` ( + `ssxProcessingResultId` int(11) unsigned NOT NULL COMMENT 'Primary key', + `dataCollectionId` int(11) unsigned DEFAULT NULL, + `hitRate` float DEFAULT NULL, + `indexingRate` float DEFAULT NULL, + `indexingType` enum('Preliminary','Final') DEFAULT NULL, + `status` enum('Running','Failed','Success') DEFAULT NULL, + `createdTimeStamp` timestamp NOT NULL DEFAULT current_timestamp(), + `lastUpdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'last update timestamp', + PRIMARY KEY (`ssxProcessingResultId`), + KEY `dataCollectionId` (`dataCollectionId`), + CONSTRAINT `SSXProcessingResult_ibfk_1` FOREIGN KEY (`dataCollectionId`) REFERENCES `DataCollection` (`dataCollectionId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Processing Results table for SSX experiments.'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `SSXProcessingResultAttachment` +-- + +DROP TABLE IF EXISTS `SSXProcessingResultAttachment`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `SSXProcessingResultAttachment` ( + `ssxProcessingResultAttachmentId` int(11) unsigned NOT NULL COMMENT 'Primary key', + `ssxProcessingResultId` int(11) unsigned DEFAULT NULL, + `fileName` varchar(255) NOT NULL, + `filePath` varchar(255) NOT NULL, + `fileType` enum('Result','Log','Graph') NOT NULL, + `createdTimeStamp` timestamp NOT NULL DEFAULT current_timestamp(), + `lastUpdate` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' COMMENT 'last update timestamp', + PRIMARY KEY (`ssxProcessingResultAttachmentId`), + KEY `ssxProcessingResultId` (`ssxProcessingResultId`), + CONSTRAINT `SSXProcessingResultAttachment_ibfk_1` FOREIGN KEY (`ssxProcessingResultId`) REFERENCES `SSXProcessingResult` (`ssxProcessingResultId`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci COMMENT='Processing Results attachments table for SSX experiments.'; +/*!40101 SET character_set_client = @saved_cs_client */; + -- -- Table structure for table `SW_onceToken` -- diff --git a/schema/2_lookups.sql b/schema/2_lookups.sql index a3a3fea..d62c50b 100644 --- a/schema/2_lookups.sql +++ b/schema/2_lookups.sql @@ -1,8 +1,8 @@ --- MariaDB dump 10.19 Distrib 10.8.6-MariaDB, for Linux (x86_64) +-- MariaDB dump 10.19 Distrib 10.8.8-MariaDB, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: ispyb_build -- ------------------------------------------------------ --- Server version 10.8.6-MariaDB-1:10.8.6+maria~ubu2204 +-- Server version 10.8.8-MariaDB-1:10.8.8+maria~ubu2204 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -114,7 +114,8 @@ INSERT INTO `SchemaStatus` (`schemaStatusId`, `scriptName`, `schemaStatus`, `rec (107,'2021_08_25_New_column_for_Structure.sql','DONE','2021-08-25 10:44:17'), (108,'2022_08_17_AdminVar_bump_version.sql','DONE','2022-08-17 08:47:30'), (109,'2022_08_17_User_Portal_Sync_permission.sql','DONE','2022-08-17 13:13:52'), -(110,'2022_11_21_SSX_experiment.sql','DONE','2023-01-04 12:40:19'); +(110,'2022_11_21_SSX_experiment.sql','DONE','2023-01-04 12:40:19'), +(111,'2024_07_26_SSX_processing_results.sql','DONE','2024-07-29 12:13:41'); /*!40000 ALTER TABLE `SchemaStatus` ENABLE KEYS */; -- diff --git a/schema/3_data.sql b/schema/3_data.sql index 44aa922..b114e48 100644 --- a/schema/3_data.sql +++ b/schema/3_data.sql @@ -1,8 +1,8 @@ --- MariaDB dump 10.19 Distrib 10.8.6-MariaDB, for Linux (x86_64) +-- MariaDB dump 10.19 Distrib 10.8.8-MariaDB, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: ispyb_build -- ------------------------------------------------------ --- Server version 10.8.6-MariaDB-1:10.8.6+maria~ubu2204 +-- Server version 10.8.8-MariaDB-1:10.8.8+maria~ubu2204 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -1091,6 +1091,20 @@ INSERT INTO `Protein` (`proteinId`, `proposalId`, `name`, `acronym`, `descriptio /*!40000 ALTER TABLE `SSXDataCollection` DISABLE KEYS */; /*!40000 ALTER TABLE `SSXDataCollection` ENABLE KEYS */; +-- +-- Dumping data for table `SSXProcessingResult` +-- + +/*!40000 ALTER TABLE `SSXProcessingResult` DISABLE KEYS */; +/*!40000 ALTER TABLE `SSXProcessingResult` ENABLE KEYS */; + +-- +-- Dumping data for table `SSXProcessingResultAttachment` +-- + +/*!40000 ALTER TABLE `SSXProcessingResultAttachment` DISABLE KEYS */; +/*!40000 ALTER TABLE `SSXProcessingResultAttachment` ENABLE KEYS */; + -- -- Dumping data for table `SW_onceToken` -- diff --git a/schema/5_routines.sql b/schema/5_routines.sql index 34663da..4179e15 100644 --- a/schema/5_routines.sql +++ b/schema/5_routines.sql @@ -1,8 +1,8 @@ --- MariaDB dump 10.19 Distrib 10.8.6-MariaDB, for Linux (x86_64) +-- MariaDB dump 10.19 Distrib 10.8.8-MariaDB, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: ispyb_build -- ------------------------------------------------------ --- Server version 10.8.6-MariaDB-1:10.8.6+maria~ubu2204 +-- Server version 10.8.8-MariaDB-1:10.8.8+maria~ubu2204 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -27,11 +27,11 @@ /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -- Dump completed --- MariaDB dump 10.19 Distrib 10.8.6-MariaDB, for Linux (x86_64) +-- MariaDB dump 10.19 Distrib 10.8.8-MariaDB, for Linux (x86_64) -- -- Host: 127.0.0.1 Database: ispyb_build -- ------------------------------------------------------ --- Server version 10.8.6-MariaDB-1:10.8.6+maria~ubu2204 +-- Server version 10.8.8-MariaDB-1:10.8.8+maria~ubu2204 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;