async def _create_credential_in_db(
        self,
        db,
        credential_in,
        integration,
        integration_type,
        short_name,
        auth_type,
        encrypted_credentials,
        auth_config_class,
        user,
    ):
        """Create the integration credential in the database."""
        async with UnitOfWork(db) as uow:
            integration_cred_in = schemas.IntegrationCredentialCreateEncrypted(
                name=credential_in.name,
                description=credential_in.description
                or f"Credentials for {integration.name} - {user.email}",
                integration_short_name=short_name,
                integration_type=integration_type,
                auth_type=auth_type,
                encrypted_credentials=encrypted_credentials,
                auth_config_class=auth_config_class,
            )

            integration_credential = await crud.integration_credential.create(
                uow.session, obj_in=integration_cred_in, current_user=user, uow=uow
            )

            await uow.commit()
            await uow.session.refresh(integration_credential)

            # Get the schema model from the database object and return
            return schemas.IntegrationCredentialInDB.model_validate(
                integration_credential, from_attributes=True
            )
Create the integration credential in the database.
backend/airweave/core/connection_service.py