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

--connection <CONNECTION> option of database update is not supported #2470

Closed
Peter-B- opened this issue Jun 19, 2020 · 3 comments · Fixed by #2505
Closed

--connection <CONNECTION> option of database update is not supported #2470

Peter-B- opened this issue Jun 19, 2020 · 3 comments · Fixed by #2505
Assignees
Milestone

Comments

@Peter-B-
Copy link
Contributor

It seems like the --connection option of dotnet ef database update is not supported any more in version 3.1.5.

Is there an alternative?

> dotnet ef database update --help
                                                                                                                        
Usage: dotnet ef database update [arguments] [options]

Arguments:
  <MIGRATION>  The target migration. If '0', all migrations will be reverted. Defaults to the last migration.

Options:
  -c|--context <DBCONTEXT>               The DbContext to use.
  -p|--project <PROJECT>                 The project to use.
  -s|--startup-project <PROJECT>         The startup project to use.
  --framework <FRAMEWORK>                The target framework.
  --configuration <CONFIGURATION>        The configuration to use.
  --runtime <RUNTIME_IDENTIFIER>         The runtime to use.
  --msbuildprojectextensionspath <PATH>  The MSBuild project extensions path. Defaults to "obj".
  --no-build                             Don't build the project. Only use this when the build is up-to-date.
  -h|--help                              Show help information
  -v|--verbose                           Show verbose output.
  --no-color                             Don't colorize output.
  --prefix-output                        Prefix output with level.

> dotnet ef database update --version
Entity Framework Core .NET Command-line Tools
3.1.5

Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@smitpatel
Copy link
Member

It is available in 5.0 release dotnet/efcore#10750

@Peter-B-
Copy link
Contributor Author

Ah. Thanks. I didn't realize that.
Another reason to upgrade.

@mark-patton
Copy link

mark-patton commented Jul 3, 2020

Hi everyone, I came across this issue with 3.1.5 where i too got the --connection <CONNECTION> option of database update is not supported

If you go to the section Known issue with --connection... in this article i pulled together to explain my experience of this, you'll see how I updated my appsettings.json connection string on the fly, in the pipeline, and then running dotnet ef database update. Here's the link: entity-framework-core-migrations-in-azure-devops

Hope you find it useful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants