IdentityServer4.Templates icon indicating copy to clipboard operation
IdentityServer4.Templates copied to clipboard

Co-enable SQL Server and SQLite Identity/Autogenerate field annotations

Open tomgron opened this issue 5 years ago • 6 comments

As described in EF Core documentation here : https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/providers#one-migration-set

Note : haven't tested this by creating new items with the templates yet. Just stumbled to this after trying to switch from default SQLite implementation to SQL Server.

tomgron avatar May 26 '19 09:05 tomgron

CLA assistant check
All CLA requirements met.

dnfclas avatar May 26 '19 09:05 dnfclas

Apparently AdminUI's migration SQL scripts with files ConfigurationDb.sql and PersistedGrantDb.sql are out-of-sync with IdentityServer4 with Entity Framework Stores template and generate errors after switching provider to SQL Server (during initial migration phase, before seeding).

tomgron avatar May 26 '19 10:05 tomgron

Maybe better option would be creating the tables (and insertions) with code-first as the SQL dialect seems to differ quite a bit between SQL Server and SQLite implementations.

tomgron avatar May 26 '19 10:05 tomgron

Hi! AdminUI community edition is limited to SQLite, so changes to that template would need to be removed from the PR.

scottbrady91 avatar May 26 '19 10:05 scottbrady91

Ok - will update PR in a minute

tomgron avatar May 26 '19 10:05 tomgron

Ok - reset the AdminUI template to origin

tomgron avatar May 26 '19 10:05 tomgron