Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments | |||
|---|---|---|---|---|---|---|---|---|---|---|---|
| message_id | INT | 10 | √ | null |
|
|
|||||
| letter_id | INT | 10 | √ | NULL |
|
|
Foreign key to the letters table |
||||
| borrowernumber | INT | 10 | √ | NULL |
|
|
|||||
| subject | MEDIUMTEXT | 16777215 | √ | NULL |
|
|
|||||
| content | MEDIUMTEXT | 16777215 | √ | NULL |
|
|
|||||
| metadata | MEDIUMTEXT | 16777215 | √ | NULL |
|
|
|||||
| letter_code | VARCHAR | 64 | √ | NULL |
|
|
|||||
| message_transport_type | VARCHAR | 20 | null |
|
|
||||||
| status | enum('sent', 'pending', 'failed', 'deleted') | 7 | 'pending' |
|
|
||||||
| time_queued | TIMESTAMP | 19 | √ | NULL |
|
|
|||||
| updated_on | TIMESTAMP | 19 | current_timestamp() |
|
|
||||||
| to_address | LONGTEXT | 2147483647 | √ | NULL |
|
|
|||||
| cc_address | LONGTEXT | 2147483647 | √ | NULL |
|
|
|||||
| from_address | LONGTEXT | 2147483647 | √ | NULL |
|
|
|||||
| reply_address | LONGTEXT | 2147483647 | √ | NULL |
|
|
|||||
| content_type | MEDIUMTEXT | 16777215 | √ | NULL |
|
|
|||||
| failure_code | MEDIUMTEXT | 16777215 | √ | NULL |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| PRIMARY | Primary key | Asc | message_id |
| borrowernumber | Performance | Asc | borrowernumber |
| letter_fk | Performance | Asc | letter_id |
| message_transport_type | Performance | Asc | message_transport_type |



