CREATE TABLE nodes
(
    id BIGINT UNSIGNED DEFAULT NULL,
    type_id BIGINT UNSIGNED DEFAULT NULL,
    subtype_id BIGINT UNSIGNED DEFAULT NULL,
    ts BIGINT UNSIGNED DEFAULT 0,
    owner_id BIGINT UNSIGNED DEFAULT 1,
    decorated BIGINT UNSIGNED DEFAULT NULL,
    PRIMARY KEY ( id ),
    KEY type_id ( type_id ),
    KEY subtype_id ( subtype_id ),
    KEY decorated ( decorated,id )

) ENGINE=INNODB CHARSET=UTF8 COMMENT="Node index";
