Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | VARCHAR | 36 | null |
|
|
|||||||||||||||||||||||||||
| location_business_line_id | VARCHAR | 36 | null |
|
|
|||||||||||||||||||||||||||
| service_plan_id | VARCHAR | 36 | null |
|
|
|||||||||||||||||||||||||||
| maladaptive_behavior_id | VARCHAR | 36 | null |
|
|
|||||||||||||||||||||||||||
| name | VARCHAR | 255 | null |
|
|
|||||||||||||||||||||||||||
| topography | TEXT | 65535 | √ | null |
|
|
||||||||||||||||||||||||||
| barrier | TEXT | 65535 | √ | null |
|
|
||||||||||||||||||||||||||
| start_date | DATE | 10 | null |
|
|
|||||||||||||||||||||||||||
| end_date | DATE | 10 | √ | null |
|
|
||||||||||||||||||||||||||
| status | enum('ONGOING', 'RESOLVED', 'ON_HOLD', 'MASTERED', 'DEPRECATED', 'DISCONTINUED', 'PENDING', 'IN_OBSERVATION') | 14 | ONGOING |
|
|
|||||||||||||||||||||||||||
| previous_behavior_id | VARCHAR | 36 | √ | null |
|
|
Navigation-only link to the behavior this one superseded due to a measurement-type change. Never read by ServicePlanItemLineageService or trend aggregation - see source_item_id for that. |
|||||||||||||||||||||||||
| intensity_key_id | VARCHAR | 36 | √ | null |
|
|
||||||||||||||||||||||||||
| measure_id | VARCHAR | 36 | √ | null |
|
|
||||||||||||||||||||||||||
| is_active | BIT | 1 | 1 |
|
|
|||||||||||||||||||||||||||
| is_data_collection_enabled | BIT | 1 | 1 |
|
|
|||||||||||||||||||||||||||
| created_at | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
||||||||||||||||||||||||||
| updated_at | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
||||||||||||||||||||||||||
| created_by | VARCHAR | 36 | √ | null |
|
|
||||||||||||||||||||||||||
| updated_by | VARCHAR | 36 | √ | null |
|
|
||||||||||||||||||||||||||
| behavior_goal_id | VARCHAR | 36 | √ | null |
|
|
||||||||||||||||||||||||||
| source_item_id | VARCHAR | 36 | √ | null |
|
|
Self-FK - the item this was carried forward from on clone (issue #196, Phase 6) |
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| fk_sp_maladaptive_behaviors_behavior | Performance | Asc | maladaptive_behavior_id |
| fk_sp_maladaptive_behaviors_intensity | Performance | Asc | intensity_key_id |
| idx_sp_maladaptive_behaviors_goal | Performance | Asc | behavior_goal_id |
| idx_sp_maladaptive_behaviors_location_active | Performance | Asc/Asc | location_business_line_id + is_active |
| idx_sp_maladaptive_behaviors_plan | Performance | Asc | service_plan_id |
| idx_sp_maladaptive_behaviors_status | Performance | Asc | status |
| idx_sp_maladaptive_source_item | Performance | Asc | source_item_id |