efcore.pg icon indicating copy to clipboard operation
efcore.pg copied to clipboard

Standard AspNetUserRoles table doesn't scaffold correctly. Works in MSSQL

Open fsmirne opened this issue 2 years ago • 0 comments

npsql scaffolder doesn't create standard AspNetUserRoles table. Steps to reproduce:

  1. Create a brand new ASP.NET Core Web-App project
  2. On the next page, choose Individual Accounts for the Authentication Type
  3. After creating the application. We need to change the database to Postgres.

image

image

  1. Now we need to recreate the migrations. So we need to delete the existing ones and create brand new ones for Postgres.

image

  1. Now we need to update the database with Update-Database.

Once the standard authentication database is created in Postgres, run the scaffold command.

  1. The AspNetUserRoles table is not created. This only happens if we choose the npgsql entity framework. It works perfectly in mssql.

fsmirne avatar Dec 22 '23 15:12 fsmirne