Reputation: 15104
I run the migrations within Visual Studio's package manager. I am currently on the process of setting up a CI for our project. I was wondering how can you update the database from the CI (since you are not in the Visual Studio environment). Do I need to find a powershell.exe and execute that?
Ps. I am using Teamcity for CI.
Upvotes: 7
Views: 1623
Reputation: 30385
You can use migrate.exe to migrate a database outside of the Visual Studio environment. It is located in the packages/EntityFramework.x.x.x/tools
folder.
The tool has some rough edges that you'll need to be aware of.
startUpDirectory
parameter. Point it to the output directory of your application.You can also write your own tools, the Update-Database command is backed by the Update
method on DbMigrator
.
Upvotes: 7