fixing migration script to insert logs into DB