CREATE TABLE FaxStoreAndForward
(
    id BIGINT UNSIGNED DEFAULT NULL AUTO_INCREMENT,
    Fax BIGINT UNSIGNED NOT NULL,
    DestinationNumber VARCHAR(50) NOT NULL,
    TIFF LONGBLOB DEFAULT NULL,
    ReceivedTs BIGINT UNSIGNED DEFAULT NULL,
    Status VARCHAR(50) DEFAULT NULL,
    Error VARCHAR(100) DEFAULT NULL,
    StationId VARCHAR(100) DEFAULT NULL,
    Answers TINYINT UNSIGNED DEFAULT 0,
    Person BIGINT UNSIGNED DEFAULT NULL,
    PRIMARY KEY ( id ),
    KEY ( Fax ),
    FOREIGN KEY ( Fax ) REFERENCES FaxBase ( id) ON DELETE CASCADE ON UPDATE CASCADE

) ENGINE=INNODB CHARSET=UTF8;
