When a plugin is uninstalled, the Provider record remains in the database
with credential_id set to None while ProviderCredential rows are deleted.
Upon reinstalling the plugin and adding a new API key, the existing Provider
record causes the code to skip credential activation, leaving the new key
in an unusable state.
Now when creating a credential and the Provider record already exists with
credential_id=None, the new credential is automatically activated.
Made-with: Cursor