I have a postgres database backend to a webapp, with a table of users, and those users have an id which is used in other database tables (things like orders, tasks etc).

I have a situation where a user has changed name, and at the moment has two seperate user accounts, both now with seperate history (orders entered, tasks created), and i'd like to combine both user accounts into 1, keeping the history from both accounts.

What would be the best way to go about doing this?

  • You just have to update the User ID on the orders/tasks/etc on the "bad" account to be the "good" User ID. The devil is in the details. 😈 – AMtwo Jan 4 at 9:27
  • that'll be it. cheers – chrispaul_ Jan 7 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.