Skip to content

Commit

Permalink
[Bug fix] Populate parameter_type_category_rel table with imaging and…
Browse files Browse the repository at this point in the history
… electrophysiology variables (aces#4263)

This adds an SQL patch to  fix the issue that imaging or electrophysiology parameter_type fields are not linked to a parameter type category via the parameter_type_category_rel table.
  • Loading branch information
cmadjar authored and Krishna Chatpar committed Apr 15, 2019
1 parent 2cd4d07 commit f9529bb
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion SQL/0000-00-00-schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -1485,7 +1485,8 @@ CREATE TABLE `parameter_type_category` (

INSERT INTO `parameter_type_category` (Name, Type) VALUES
('MRI Variables','Metavars'),
('Identifiers', 'Metavars');
('Identifiers', 'Metavars'),
('Electrophysiology Variables', 'Metavars');

CREATE TABLE `parameter_type_category_rel` (
`ParameterTypeID` int(11) unsigned NOT NULL default '0',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
INSERT INTO parameter_type_category_rel (ParameterTypeID, ParameterTypeCategoryID)
SELECT DISTINCT ParameterTypeID, ParameterTypeCategoryID
FROM parameter_type, parameter_type_category ptc
WHERE SourceFrom="parameter_file" AND ptc.Name="MRI Variables";


INSERT INTO parameter_type_category (Name, Type)
VALUES ('Electrophysiology Variables', 'Metavars');

INSERT INTO parameter_type_category_rel (ParameterTypeID, ParameterTypeCategoryID)
SELECT DISTINCT ParameterTypeID, ParameterTypeCategoryID
FROM parameter_type, parameter_type_category ptc
WHERE SourceFrom="physiological_parameter_file" AND ptc.Name="Electrophysiology Variables";

0 comments on commit f9529bb

Please sign in to comment.