-
Notifications
You must be signed in to change notification settings - Fork 175
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Imaging Preprocessing Scripts: Added a ScannerID column to files table: Redmine 10939 #2189
Conversation
Current coverage is 13.76% (diff: 0.00%)@@ 17.0-dev #2189 diff @@
==========================================
Files 118 121 +3
Lines 20107 20242 +135
Methods 1124 1132 +8
Messages 0 0
Branches 0 0
==========================================
+ Hits 2759 2787 +28
- Misses 17348 17455 +107
Partials 0 0
|
Shouldn't we just call the field something more like 'ScannerID' and link it directly to the primary key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could use a minor change, but I'm mostly setting this to "Request changes" to see how it works.
@@ -448,6 +448,7 @@ CREATE TABLE `files` ( | |||
`ProcessProtocolID` int(11) unsigned, | |||
`Caveat` tinyint(1) default NULL, | |||
`TarchiveSource` int(11) default NULL, | |||
`ScannerCandID` int(11) DEFAULT NULL, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this should be a foreign key to the ID column, and not the CandID column of the mri_scanner table.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
@@ -458,7 +459,8 @@ CREATE TABLE `files` ( | |||
CONSTRAINT `FK_files_2` FOREIGN KEY (`AcquisitionProtocolID`) REFERENCES `mri_scan_type` (`ID`), | |||
CONSTRAINT `FK_files_1` FOREIGN KEY (`SessionID`) REFERENCES `session` (`ID`), | |||
CONSTRAINT `FK_files_3` FOREIGN KEY (`SourceFileID`) REFERENCES `files` (`FileID`), | |||
CONSTRAINT `FK_files_4` FOREIGN KEY (`ProcessProtocolID`) REFERENCES `mri_processing_protocol` (`ProcessProtocolID`) | |||
CONSTRAINT `FK_files_4` FOREIGN KEY (`ProcessProtocolID`) REFERENCES `mri_processing_protocol` (`ProcessProtocolID`), | |||
CONSTRAINT `files_scannerID_fk` FOREIGN KEY (`ScannerCandID`) REFERENCES `mri_scanner` (`CandID`) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a second comment to test GitHub's new code review feature
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
|
I didn't mean the scanner ID (the serial number of the scanner from the dicom header) I meant the column named mri_scanner.ID (the primary key for the table.. which already exists.) I think the convention to answer is to reply to the comment saying "Done". I don't know if GitHub has any specific built-in way to do it. |
yes this is exactly what I did, the ID of the mri_scanner... |
23459cd
to
fec0f7c
Compare
@gluneau |
@@ -0,0 +1,5 @@ | |||
-- Add ScannerCandID column to files, back-populate the newly added column from parameter_file table, then add foreign key constraints | |||
ALTER TABLE files ADD `ScannerID` int(10) unsigned NOT NULL default '0'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
set this to NULL (default)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done in: #2251
To be used with Loris-MRI pull request: aces/Loris-MRI#156