Refactor: embed insert query inside sequence updater