create table inventory_packages
(
    asset_id   bigint not null references inventories (asset_id) on update cascade on delete cascade,
    package_id bigint not null references packages (id) on update cascade on delete restrict,
    primary key (asset_id, package_id)
);

create index inventory_packages_package_id_idx on inventory_packages (package_id);
