create table action.log_email
(
    log_email_id            bigint auto_increment
        primary key,
    log_email_type          varchar(32)                            null,
    log_email_address       varchar(128)                           null,
    log_email_timestamp     timestamp  default current_timestamp() null,
    log_email_subject       varchar(512)                           null,
    log_email_action        varchar(128)                           null,
    log_email_message_id    varchar(128)                           null,
    log_email_headers       text                                   null,
    log_email_text          text                                   null,
    log_email_status        varchar(16)                            null,
    person_id               int                                    null,
    account_id              int                                    null,
    log_email_delivery_time timestamp                              null,
    environment             varchar(16)                            null,
    last_alert_cleared      tinyint(1) default 0                   null,
    form_id                 int                                    null,
    log_message_type        varchar(11)                            null
);