Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| variable_value_id | int8 | 19 | null | 
                                         | 
                                    
                                        
  | 
                                    |||||||||
| variable_id | int8 | 19 | null | 
                                         | 
                                    
                                        
  | 
                                    |||||||||
| variable_type_id | int4 | 10 | null | 
                                         | 
                                    
                                        
  | 
                                    |||||||||
| usage_type_id | int4 | 10 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||
| text_value | text | 2147483647 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||
| used_variable_id | int8 | 19 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||
| used_variable_type_id | int4 | 10 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||
| display_style_id | int4 | 10 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    
Indexes
| Constraint Name | Type | Sort | Column(s) | 
|---|---|---|---|
| variable_section_values_pkey | Primary key | Asc | variable_value_id | 
| variable_section_values_used_variable_id_idx | Performance | Asc | used_variable_id | 
Check Constraints
| Constraint Name | Constraint | 
|---|---|
| injection_has_display_style | ((usage_type_id = 1) = (display_style_id IS NOT NULL)) | 
| cannot_reference_other_sections | ((used_variable_type_id IS NULL) OR (used_variable_type_id <> 8)) | 
| usages_must_have_types | ((used_variable_id IS NULL) = (usage_type_id IS NULL)) | 
| reference_only_for_figures_and_sections | ((usage_type_id <> 2) OR (used_variable_type_id = ANY (ARRAY[4, 6, 8]))) | 
| must_have_text_or_reference | ((text_value IS NOT NULL) OR (used_variable_id IS NOT NULL)) | 
| cannot_inject_sections | (NOT ((usage_type_id = 1) AND (used_variable_type_id = 8))) | 
| cannot_have_both_text_and_reference | ((text_value IS NULL) OR (used_variable_id IS NULL)) |