AspNetUsers migration

Hii,

I am running radzen with the Blazor flavour.

  1. I have created my app in Radzen.
  2. Infered my db.
  3. Enabled security, which has created the AspNetUser and all the other user tables.
  4. I then exited Radzen and modified my db in SQL server studio, adding Foreign keys in some of the tables linking to AspNetUsers.
  5. I went back to Radzen and infered the db.
  6. Now when I want to run the app in Radzen it wants to migrate the db and re-create the AspNetUser's tables, then gives an Error that the tables already exists.
  • If I remove the " identityDbContext.Database.Migrate();" line from startup it is running fine in Studio
  • If I delete the files in the "Migrations" directory as Radzen is starting up my app, then it also runs fine, with security apparently working (e.g I can create a user)

What have I done, and how can I fix it?

Kind regards
Riaan

Extending that table is supposed to be done via entity framework migrations according to the official documentation. Here is the related section in Radzen.

If this is too much you can use Radzen's code generation ignore list to either delete the migrations and never have them again or to remove the identityDbContext.Database.Migrate() line.

Probably ignoring the migrations is better:

Thanks Korchev

I do have quite a few of them. I was busy extending my tables.....and stopped to check if it was working....when it gave the error, I panicked.

Thanks again for your excellent support.