table! { agents (id) { alias -> Nullable, agent_id -> Text, hostname -> Text, id -> Integer, is_root -> Bool, is_root_allowed -> Bool, last_active -> Timestamp, platform -> Text, regtime -> Timestamp, status -> Nullable, token -> Nullable, username -> Text, } } table! { certificates (id) { agent_id -> Integer, id -> Integer, is_revoked -> Bool, } } table! { ip_addrs (id) { agent_id -> Integer, check_ts -> Timestamp, gateway -> Nullable, id -> Integer, iface -> Text, ip_addr -> Text, is_gray -> Bool, netmask -> Text, } } table! { jobs (id) { alias -> Nullable, id -> Integer, job_type -> Text, exec_type -> Text, platform -> Nullable, data -> Binary, } } table! { results (id) { agent_id -> Integer, created -> Timestamp, id -> Integer, job_id -> Integer, result -> Nullable, status -> Nullable, ts -> Timestamp, } } joinable!(certificates -> agents (agent_id)); joinable!(ip_addrs -> agents (agent_id)); joinable!(results -> agents (agent_id)); joinable!(results -> jobs (job_id)); allow_tables_to_appear_in_same_query!( agents, certificates, ip_addrs, jobs, results, );