0

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?

1 Answer 1

1

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();
Sign up to request clarification or add additional context in comments.

1 Comment

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, =)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.