I have two exactly same set of data (two separate databases) and I'd like to join them into one database. The tables are shown in the picture below. I cannot just export the data from one database and import to other database because I would get unique primary key violations.
Both databases have following tables:
How could I update primary keys of one database, that the primary keys are changed in the junction tables as well. Eg how to add 1000 to all the primary keys in whole the database. Or if there is any other approach I could use to import the data from one database to another with all the relations