fix(upgrade): use correct table prefixes on river upgrade script

Fixes: #7033