Closed JeremyVm closed 1 year ago
This looks like the EF migrations are not in a good state. I recommend that you go back to the previous version of Duende.BFF and reset your migrations so that you have a good snapshot of where you're migrating from, following these docs. Then upgrade your BFF and try again to generate a migration.
I think everything was ok. Apparently you have to first create the migrations itself and then you can make the call to make the scripts.
I was not aware of this. The issue can be closed.
Which version of Duende BFF are you using? 2.0.0
Which version of .NET are you using? net 6.0
I'm trying to create the migrations for use with serversidesessions stored in ef core. When I try to create the migration I only get the migration history part, not the UserSessions Table.
This is my code in my Blazor WASM Server side Program.cs:
builder.Services .AddBff(options => options.EnableSessionCleanup = true) .AddEntityFrameworkServerSideSessions(options => options.UseSqlServer(configuration.GetConnectionString("IdentityServer"))) .AddRemoteApis();
In my CLI I run:
dotnet ef migrations script --idempotent
This is my output:
IF OBJECT_ID(N'[EFMigrationsHistory]') IS NULL BEGIN CREATE TABLE [EFMigrationsHistory] ( [MigrationId] nvarchar(150) NOT NULL, [ProductVersion] nvarchar(32) NOT NULL, CONSTRAINT [PK___EFMigrationsHistory] PRIMARY KEY ([MigrationId]) ); END; GO
I'm doing something wrong. Just don't know what for the moment.