Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| id | CHAR | 36 | null | 
                                        
  | 
                                    
                                        
  | 
                                    |||||||||||||||||||||
| date_entered | DATETIME | 26 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| date_modified | DATETIME | 26 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| assigned_user_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||
| modified_user_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||
| created_by | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||
| deleted | BIT | 1 | √ | 0 | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| date_sent | DATETIME | 26 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| message_id | VARCHAR | 255 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| message_uid | VARCHAR | 64 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| name | VARCHAR | 255 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| type | VARCHAR | 100 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| status | VARCHAR | 100 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| flagged | BIT | 1 | √ | 0 | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| reply_to_status | BIT | 1 | √ | 0 | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| intent | VARCHAR | 100 | √ | pick | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| mailbox_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||
| state | VARCHAR | 100 | Archived | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||
| reply_to_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| parent_type | VARCHAR | 255 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| parent_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||
| direction | VARCHAR | 20 | Unknown | 
                                         | 
                                    
                                         | 
                                    |||||||||||||||||||||
| total_attachments | INT | 10 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| outbound_email_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| sync_key | VARCHAR | 100 | √ | null | 
                                         | 
                                    
                                         | 
                                    ||||||||||||||||||||
| team_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    ||||||||||||||||||||
| team_set_id | CHAR | 36 | √ | null | 
                                         | 
                                    
                                        
  | 
                                    
Indexes
| Constraint Name | Type | Sort | Column(s) | 
|---|---|---|---|
| PRIMARY | Primary key | Asc | id | 
| idx_date_modified | Performance | Asc | date_modified | 
| idx_email_assigned | Performance | Asc/Asc/Asc | assigned_user_id + type + status | 
| idx_email_name | Performance | Asc | name | 
| idx_email_parent_id | Performance | Asc | parent_id | 
| idx_emails_skey | Must be unique | Asc | sync_key | 
| idx_emails_tmst_id | Performance | Asc/Asc | team_set_id + deleted | 
| idx_mailbox_id | Performance | Asc | mailbox_id | 
| idx_message_id | Performance | Asc | message_id | 
| idx_state | Performance | Asc/Asc | state + id | 

