CREATE TABLE NotifyCallsAmdStatus
(
    id BIGINT UNSIGNED NOT NULL AUTO_INCREMENT COMMENT "Unique id for the AMD status entry",
    CallId BIGINT UNSIGNED NOT NULL COMMENT "Id of the corresponding call in the NotifyCalls table for the AMD status entry",
    LaunchId BIGINT UNSIGNED NOT NULL COMMENT "Id of the launch in which the call with AMD was made",
    AmdStatus ENUM("MACHINE", "HUMAN", "NOTSURE") NOT NULL DEFAULT "MACHINE" COMMENT "Status returned by the AMD algorithm",
    AmdCause VARCHAR(50) NOT NULL COMMENT "Details explaining the AmdStatus returned",
    Ts BIGINT UNSIGNED NOT NULL COMMENT "Timestamp at which the AMD status was set",
    PRIMARY KEY ( id ),
    KEY LaunchAmdStatus ( LaunchId,AmdStatus ),
    UNIQUE KEY CallId ( CallId )

) ENGINE=INNODB CHARSET=UTF8 COMMENT="AMD status for each call that ran the AMD algorithm";
