question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Update Database - Connection

See original GitHub issue

Describe the bug

When using the Update Database feature, it’s not possible to specify a non-default connection

To Reproduce

Steps to reproduce the behavior:

  1. In Rider, select Tools : Entity Framework Core : Update Database
  2. Uncheck “Use default connection of startup project”
  3. Enter a connection string without surrounding quotes, or a connection name without surrounding quotes
  4. Click preview and note how the connection string is specified in the command with escaped quotes around the connection string.
dotnet ef database update --project my.csproj --startup-project my.csproj --context myContext --configuration Debug myBranch --connection \"connectionName\"
  1. Click OK and see error message.

Expected behavior

The connection string in the command should be included in the command with unescaped quotes, and the update should execute.

Environment (please complete the following information):

  • OS: Windows 10
  • .NET SDK info (installed ones and version used within Rider): 6.0
  • Plugin version: 222.1.0
  • Rider version: 2022.2.1

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
seclerpcommented, Aug 15, 2022

Thanks for the report, seems like double escaping is accidentally applied somewhere in the code. For a temporary workaround, you could try to use “Additional arguments” field if it work for you.

0reactions
drjohnsonjrcommented, Aug 16, 2022

Thank you, Vova, for your very fast responses yesterday!

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to explicitly name the database when using Entity ...
When doing update-database you should specify the project that contains the migrations. ... It trying to get "DefaultConnection" connection string first ...
Read more >
Update a database connection—ArcGIS Insights
If a workbook is open in Insights, save your work and click the Home button Home · Click the Connections tab Connections ·...
Read more >
Update WordPress database connection details – Support
Update WordPress database connection details. Step 1 - Open File Manager: Step 2 - Open wp-config.php: Step 3 - Locate the login details:...
Read more >
EF Core tools reference (Package Manager Console)
Update -Database​​ The number 0 is a special case that means before the first migration and causes all migrations to be reverted. If...
Read more >
WordPress: How to Update Database Connection Strings
How to Update Database Connection Strings ; Log in to your account Hosting Summary. Domains Tab ; Go to File Manager. Filemanager ;...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found