Loris icon indicating copy to clipboard operation
Loris copied to clipboard

[database] Clean up mri_scan_type

Open maximemulder opened this issue 8 months ago • 3 comments

Summary of changes

  • Add missing foreign keys.
  • Rename Scan_type foreign key fields to MriScanTypeID.
  • Remove the default value of 0 for mri_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

  1. Apply the patch
  2. Reinstall Raisinbread
  3. 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 to files.MriScanTypeID ?
  • Should mri_scan_type.Scan_type be renamed to mri_scan_type.Name ?

Related issues

  • Resolves #9284
  • Complementary LORIS-MRI PR 1139

maximemulder avatar Jun 26 '24 15:06 maximemulder