Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Update-Database able to update any database #14517

Closed
JorgenLindell opened this issue Jan 23, 2019 · 2 comments
Closed

Make Update-Database able to update any database #14517

JorgenLindell opened this issue Jan 23, 2019 · 2 comments

Comments

@JorgenLindell
Copy link

I am working in an environment where I have multiple versions of the database in parallell, i.e Development, Migration and Production.

I have a problem when I have made changes via migrations in my Development database and is going to deploy to my Mig and Prod environments, as there doesn't seem to be any simple way through "update-database" to point it to any other database than my development one.

How is this supposed to be done?

I would have liked "Update-database" to take a connection string parameter and be able to apply the missing migrations to any database I point it to.

Currently I am using the schema diff functionality in VS to create a diff script between dev and the target database, but this is a manual step, and as such prone to errors.

@Eilon Eilon transferred this issue from dotnet/aspnetcore Jan 25, 2019
@popcatalin81
Copy link

@JorgenLindell In the case, you're describing the migrations are usually applied at runtime during application bootstrap.

https://docs.microsoft.com/en-us/ef/core/managing-schemas/migrations/#apply-migrations-at-runtime

@ajcvickers
Copy link
Contributor

Duplicate of #10750

@ajcvickers ajcvickers marked this as a duplicate of #10750 Jan 25, 2019
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants