Loris
Loris copied to clipboard
[database] Clean up mri_scan_type
Summary of changes
- Add missing foreign keys.
- Rename
Scan_type
foreign key fields toMriScanTypeID
. - Remove the default value of
0
formri_protocol.MriScanTypeID
(as this is a non-nullable foreign key, I don't think this should ever happen). - Adapt the existing queries and scripts in LORIS.
Testing instructions
- Apply the patch
- Reinstall Raisinbread
- Test the associated LORIS feature
As we unfortunately have a very loose typing in LORIS, I may have missed a few bugs when adapting the scripts, but we're early on the next version development cycle so I guess it's the right time to do such changes.
Alternatives
- The foreign key fields could just be named
ScanTypeID
(it's obvious it's an "MRI" scan type). - Should the
files.AcquisitionTypeID
also be renamed tofiles.MriScanTypeID
? - Should
mri_scan_type.Scan_type
be renamed tomri_scan_type.Name
?
Related issues
- Resolves #9284
- Complementary LORIS-MRI PR 1139