[英]How to create Identity Server DB for SQLite?
我已經運行dotnet new is4ef
來創建身份服務器模板。
接下來,我在Startup.cs
中更改了UseSqlServer()
-> UseSqlite()
。
程序編譯,但運行時未創建數據庫中的表。
如何為配置存儲和操作存儲創建合適的表?
要創建數據庫,您需要運行遷移:
dotnet tool install --global dotnet-ef
dotnet ef migrations add 'initial' --project src/IdentityServer/IdentityServer.csproj --context PersistedGrantDbContext
然后你更新數據庫
dotnet ef database update --project src/IdentityServer/IdentityServer.csproj --context ConfigurationDbContext
然后創建數據庫。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.