I'm using vagrant to host my DB and website, but I make changes to my project locally and push changes to the vagrant site. I can run migrate.exe to update the DB but I can't figure out how to run add-migration? If I run it locally, it says I have pending changes because I have no DB locally? Can anyone point me in the right direction?
Add a comment
|
1 Answer
One option to update database without use dotnet ef database update is execute the command bellow in some default action or startup routine
_dbContext.Database.Migrate();
1 Comment
user204588
Thanks for the answer. It's a good idea but what I did was just setup my vagrant SQL instance to accept remote connections and pointed my VS project to the remote SQL. Don't know why that didn't occur to me earlier, =)