record_migration needs a cursor