# Rack Database Structure: Constraints table

This table defines constraints, which are sets of racks which must be selected together. Each constraint has a name and a number of racks, at least one of which must be defined as a trigger. Constraints are applied during the combo generation part of a run. If a run has a constraint selected, and randomly selects one of the racks that constraint has defined as a trigger, all the other racks (including other triggers) included in that constraint immediately get selected. In a rack-level run, these are added to the total number of racks selected; in a facility-level run, they are not. This is the main difference between a rack and a facility scenario, and because of it a facility scenario needs to have a special set of constraints. The only randomly-selectable racks in a facility scenario should be constraint triggers, so that by randomly selecting one of them, every rack in that facility is selected.

Fields
name | string | The name of the constraint this row is a part of
rack | integer | The rack this row includes in the constraint
trigger | boolean | True if this rack can be used to trigger the constraint.