IdentityServer / IdentityServer3.EntityFramework

EntityFramework persistence layer for IdentityServer3
Apache License 2.0
68 stars 97 forks source link

Entity Framework Migrations with OperationalData #100

Closed senj closed 8 years ago

senj commented 8 years ago

Hey there,

I want to enable EF Migrations. I'm following this and it works for my Client and Scope Store as I registered them from day 1.

Now I noticed I also have to target the OperationalDbContext. I tried to add factory.RegisterOperationalServices(operationalStoreConfig); but this has no effect.. maybe because it's already created? If there is no OperationalService registered, are those configurations in-memory? Or is there a connection string I can use to migrate..?

Thanks..

brockallen commented 8 years ago

With EF migrations, I think the normal expectation is that you create the DB tables first via a .sql script or via the update-databade EF command.

Also, does the EF sample work correctly for you? https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/EntityFramework

senj commented 8 years ago

Well after the weekend my database had the new table OperationalData and I was able to create a migration file. Maybe I didn't refresh the sql manager. thanks anyway.