refactor(scripts): refactor db sync