I have an application that unfortunately has been allowed to grow on 4 setups. That's too much maintenance, therefore it must be converted into 1 SaaS setup.
Any good ideas on how I can merge those 4 databases where there will be a lot of duplicated IDs?
How about you add a temporary old_id (which you clear between database imports) to all your new database tables as well as temporary foreign key fields old_..._id (which you also clear between imports) ? Then you link all your entries together based on those IDs, but you assign the new incremented IDs to the "real" columns.