Skip to content

Commit

Permalink
data_dictionary_builder.php unique constraint fix (#9201)
Browse files Browse the repository at this point in the history
Only re-build instrument data dictionaries, not all data dictionaries, to ensure all names are unique.
  • Loading branch information
laemtl committed Apr 23, 2024
1 parent e33fcd7 commit 43f53e9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tools/exporters/data_dictionary_builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,12 @@
$instrumentParameterTypeCategoryIDs = [];
$instrumentParameterTypeIDs = [];


$parameter_types = $DB->pselectColWithIndexKey(
"Select Name, ParameterTypeID from parameter_type",
"SELECT pt.Name, pt.ParameterTypeID
FROM parameter_type pt
JOIN parameter_type_category_rel ptcr USING (ParameterTypeID)
JOIN parameter_type_category ptc USING (ParameterTypeCategoryID)
WHERE ptc.Type = 'Instrument'",
[],
"Name"
);
Expand Down

0 comments on commit 43f53e9

Please sign in to comment.