Talk:Unmerge/@comment-128.194.89.247-20120903155057
To just unmerge one ticket, a better way is: update Tickets set EffectiveId=id where id=source'_ticket_id This will not affect any other tickets merged into the target ticket.
There are a couple more steps needed to truly undo a merge, to get rid of the "$user - merged into ticket $ticket" messages in the ticket.
In the Transactions table there will be two transactions with Created=time of merge, Type='AddLink', Field='MergedInto', and NewValue='fsck.com-rt://$rtname/ticket/merged_into_ticket' (where $rtname is what you set it to in your RT_SiteConfig.pm). ObjectId will be the source ticket on one transaction and the target ticket on the other.
Delete both of these transactions to get rid of the "merged into" messages.
Also note the source ticket gets resolved at the time of merge, so you may wish to reopen it.