Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | VARCHAR | 36 | null |
|
|
|||
| user_id | VARCHAR | 36 | null |
|
|
|||
| location_business_line_id | VARCHAR | 36 | null |
|
|
|||
| started_at | TIMESTAMP | 19 | null |
|
|
|||
| ended_at | TIMESTAMP | 19 | √ | null |
|
|
||
| started_by | VARCHAR | 36 | √ | null |
|
|
||
| ended_by | VARCHAR | 36 | √ | null |
|
|
||
| created_at | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
||
| updated_at | TIMESTAMP | 19 | √ | CURRENT_TIMESTAMP |
|
|
||
| created_by | VARCHAR | 36 | √ | null |
|
|
||
| updated_by | VARCHAR | 36 | √ | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | id |
| idx_user_active_periods_dates | Performance | Asc/Asc | started_at + ended_at |
| idx_user_active_periods_location | Performance | Asc | location_business_line_id |
| idx_user_active_periods_user | Performance | Asc | user_id |