upgrade fix

dont try to access pulp if we dont actually need to
this allows migrations to work on fresh machines
during db population (and for tests)