abpframework / eShopOnAbp

Reference microservice solution built with the ABP Framework and .NET, runs on Kubernetes with Helm configuration, includes API Gateways, Angular and ASP.NET Core MVC applications, PostgreSQL and MongoDB databases
https://www.eShopOnAbp.com/
MIT License
664 stars 259 forks source link

Fix for the error 'relation "AbpPermissionGroups" does not exist' #170

Closed jflaga closed 1 year ago

jflaga commented 1 year ago

This is a fix for issue https://github.com/abpframework/eShopOnAbp/issues/168

How to replicate issue

When clicking on "Add to basket" on the public-web app (https://localhost:44335/), it throws this error:

Grpc.Core.RpcException: 'Status(StatusCode="Unavailable", Detail="Error starting gRPC call. HttpRequestException: No connection could be made because the target machine actively refused it. (localhost:81)

And the logs for the Catalog microservice has this error:

relation "AbpPermissionGroups" does not exist

How this fix was discovered

I learned from this closed PR that the AdministrationService will be updated to fix the 'relation "AbpPermissionGroups" does not exist' error.

I found out that the update for AdministrationService was done in commit # https://github.com/abpframework/eShopOnAbp/commit/c3aca0f334d7096a038fa9b1d45be737e3bd3820. In this commit, DbSet for PermissionGroups and Permissions were added to AdministrationServiceDbContext, but no corresponding migration scripts was added. So I added migration scripts for that and created this PR.