How do I run ASP.NET Core Entity Framework migrations from Visual Studio Team Services

此生再无相见时 提交于 2019-12-04 13:54:29

I would suggest using the dotnet ef tools (during VSTS Build) to generate a .sql script which could be used to generate or update your database wherever needed (during the Release).

dotnet ef migrations script -o migration-script.sql -i -v

During Release amongst other options you could run Invoke-SqlCmd:

Invoke-SqlCmd -inputfile "$inputFile" -serverinstance "$serverInstance" -username "$serverUserName" -password "$serverPassword" -database "$database"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!