refactor(scripts): much, much better db sync