Skip to content
Open
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
4 changes: 3 additions & 1 deletion SQL/Archive/27.0/2024-06-25-Clean-Mri-Scan-Type.sql
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
ALTER TABLE `mri_protocol_checks`
DROP FOREIGN KEY `FK_mriProtocolChecks_ScanType`;

-- Rename foreign key fields for consistency

ALTER TABLE `mri_scan_type`
Expand Down Expand Up @@ -46,6 +49,5 @@ ALTER TABLE `mri_violations_log`
-- Rename the existing constraints for consistency

ALTER TABLE `mri_protocol_checks`
DROP FOREIGN KEY `FK_mriProtocolChecks_ScanType`,
ADD CONSTRAINT `FK_mri_protocol_checks_scan_type`
FOREIGN KEY (`MriScanTypeID`) REFERENCES `mri_scan_type` (`MriScanTypeID`);
5 changes: 4 additions & 1 deletion SQL/Release_patches/26.0_To_27.0_upgrade.sql
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,10 @@ UPDATE test_battery SET DoubleDataEntryEnabled = 'Y' WHERE Test_name IN (
DELETE FROM Config WHERE ConfigID IN (SELECT ID FROM ConfigSettings WHERE Name = 'DoubleDataEntryInstruments');

DELETE FROM ConfigSettings WHERE Name = 'DoubleDataEntryInstruments';

ALTER TABLE `mri_protocol_checks`
DROP FOREIGN KEY `FK_mriProtocolChecks_ScanType`;

-- Rename foreign key fields for consistency

ALTER TABLE `mri_scan_type`
Expand Down Expand Up @@ -141,7 +145,6 @@ ALTER TABLE `mri_violations_log`
-- Rename the existing constraints for consistency

ALTER TABLE `mri_protocol_checks`
DROP FOREIGN KEY `FK_mriProtocolChecks_ScanType`,
ADD CONSTRAINT `FK_mri_protocol_checks_scan_type`
FOREIGN KEY (`MriScanTypeID`) REFERENCES `mri_scan_type` (`MriScanTypeID`);
-- Drop nonsensical defaults and put use right type for others.
Expand Down
Loading