Upgrade routine for merging multisite tables