I prefer being on point hehe. But your error message is quite interesting, it indicates trouble with a tag which is unusual.
I will provide all codes that should ensure there is no foreign key left.
In the above case the last line should be relevant. As you don’t have a mail address there, you can just set u_id=438
(in your special case as this is the bad ID of the affected user)
u_id = User.find_by(email: '<TARGET_CUSTOMER_EMAIL>').id
ActivityStream.where(created_by_id: u_id).update_all(created_by_id: 1)
History.where(created_by_id: u_id).update_all(created_by_id: 1)
Ticket::Article.where(created_by_id: u_id).update_all(created_by_id: 1)
Ticket::Article.where(updated_by_id: u_id).update_all(updated_by_id: 1)
Store.where(created_by_id: u_id).update_all(created_by_id: 1)
StatsStore.where(created_by_id: u_id).update_all(created_by_id: 1)
OnlineNotification.find_by(user_id: u_id).destroy!
Tag.where(created_by_id: u_id).update_all(created_by_id: 1)
If it still nukes you, let me know.
Thanks, if it’s okay, I prefer Rum and Whiskey.