- cmd ci 命令
dotnet ef migrations add NewColum --新增migrations dotnet ef database update--跟新數據庫 dotnet ef migrations add Addrs--新增一個migrations dotnet ef database update dotnet ef datebase update NewColum--根據newcolum跟新數據庫 dotnet ef migrations remove--刪除最新未使用的migrations
- VS 程序包管理控制台命令
Add-Migration InitConfigurations -Context ConfigurationDbContext -OutputDir Data\Migrations\IdentityServer\Configuration Add-Migration InitPersistedGrant -Context PersistedGrantDbContext -OutputDir Data\Migrations\IdentityServer\PersistedGrantDb DBcontext 在 Identityserver4.EntityFramwork.DbContexts 命名空間下 Update-Database -Context ConfigurationDbContext Update-Database -Context PersistedGrantDbContext