create table group_hosts
(
    group_id bigint not null references groups (id) on update cascade on delete cascade,
    host_id  bigint not null references hosts (id) on update cascade on delete cascade,
    primary key (group_id, host_id)
);

create index group_hosts_host_id_idx on group_hosts (host_id);
