Check and change datatype of id columns
On table entity the id column is of datatype integer, so only 2.147.483.647 rows can be stored.
Solution: change datatype to bigint.
here are the commands I used directly on the DB, this should also be added to this repository.
ALTER TABLE public.asset DROP CONSTRAINT fk_asset_entity_id;
ALTER TABLE public.entity ALTER COLUMN id TYPE bigint USING id::bigint;
ALTER SEQUENCE entity_id_seq AS bigint;
ALTER TABLE public.asset ALTER COLUMN entity_id TYPE bigint USING entity_id::bigint;
ALTER TABLE public.asset ADD CONSTRAINT fk_asset_entity_id FOREIGN KEY (entity_id) REFERENCES entity(id) ON DELETE CASCADE;