scripts for old_db migration