CREATE TABLE ScheduledRelationDataType
(
    id BIGINT UNSIGNED NOT NULL,
    Node BIGINT UNSIGNED NOT NULL,
    Field VARCHAR(255) NOT NULL,
    Start BIGINT UNSIGNED NOT NULL,
    End BIGINT UNSIGNED NOT NULL,
    Related BIGINT UNSIGNED NOT NULL,
    Reason VARCHAR(50) DEFAULT NULL,
    PRIMARY KEY ( id ) AUTO_INCREMENT,
    KEY ( Node,Field ),
    UNIQUE KEY ( Node,Field,Start,End,Related ),
    KEY ( Related,Field,Start,End ),
    KEY ( Start,End )

) ENGINE=INNODB CHARSET=UTF8;
