fixing migrate_db script.