* Add per-version DB upgrade routine. Update order stats index length as well. * Use globally namespaced methods for DB updates. * Avoid creating duplicate DB update actions.