Skip to content

mri scan type PATCH fix#10517

Open
HachemJ wants to merge 2 commits into
aces:27.0-releasefrom
HachemJ:fix_maxime_patch_mriscantype
Open

mri scan type PATCH fix#10517
HachemJ wants to merge 2 commits into
aces:27.0-releasefrom
HachemJ:fix_maxime_patch_mriscantype

Conversation

@HachemJ

@HachemJ HachemJ commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

Brief summary of changes

This PR fixes a flaw in logic with the UPGRADE SQL patch for the 27 version.
This is the error I was getting when running the following CHANGE command:

ALTER TABLE `mri_scan_type`
  CHANGE `ID` `MriScanTypeID` int(11) unsigned NOT NULL auto_increment;
ERROR 1846 (0A000): ALGORITHM=COPY is not supported. Reason: Columns participating in a foreign key are renamed. Try ALGORITHM=INPLACE

I tried bypassing this error by dropping the foreign keys of the table and re-adding them with the renamed table columns.

This resulted in an additional error further along the release patch because one of the three foreign keys that were needed to be dropped in order to bypass the first error is dropped later on in the patch:

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`);

@github-actions github-actions Bot added the Language: SQL PR or issue that update SQL code label Jun 2, 2026
@HachemJ HachemJ added Critical to release PR or issue is key for the release to which it has been assigned Release: SQL patch PR that contains an SQL patch to apply 27.0.0 - Bugs Bugs Found in LORIS 27 testing labels Jun 2, 2026

@MaximeBICMTL MaximeBICMTL left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked the LORIS 26 SQL schema and this looks to be the only foreign key on Scan_type so the fix looks correct to me.

I also ran the corrected 26.0 to 27.0 patch on a fresh 26.0 Raisinbread install on my LORIS VM.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

27.0.0 - Bugs Bugs Found in LORIS 27 testing Critical to release PR or issue is key for the release to which it has been assigned Language: SQL PR or issue that update SQL code Release: SQL patch PR that contains an SQL patch to apply

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants