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.

Migrations Bundles: Provide more info about the bundle

See original GitHub issue

Today the bundle is effectively just dotnet ef database update, but I’ve been thinking it would be helpful to include gestures for these commands too in the bundle:

  • dotnet ef dbcontext info (or even just a way to see the DbContext type of the bundle in --help)
  • dotnet ef migrations list
  • dotnet ef migrations script (although this seems much less important since you can just generate a script instead of a bundle in the first place)

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:11
  • Comments:10 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
bricelamcommented, Oct 19, 2021

We solved the issues I listed there in EF Core 5.0 which made the script a lot more robust.

The problems that still exist with the script which are solved by bundles are:

  • They need something (usually database-specific) to execute them (Sqlcmd, SSMS, MSDeploy, etc.)
  • Most tools that execute SQL Server scripts simply continue on to the next statment when they encounter an error. This can leave the database in a very bad state
  • Transaction handling isn’t always obvious. For example, MSDeploy appears to completely ignore the BEGIN and END statements and tries to wrap everything into a single transaction

If you have a working solution, there’s no need to move to bundles. Bundles simply enable more databases to achieve the same rich experience on more platforms.

1reaction
wdhenrikcommented, Aug 4, 2022

Please consider this an emphatic vote for validating how a bundle will change a target. I’m looking for something like: bundle --connection [connection string] --script-pending --output [output path]

I’m using bundles in CI/CD and there doesn’t seem any way for me to verify what changes will take place when run against a specific target. I’m generating a single bundle artifact in CI and want to use that all the way through the CD stack.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introducing DevOps-friendly EF Core Migration Bundles
EF Core's new migration bundles provide build artifacts to deploy schema and data changes to your database as part of your DevOps pipeline....
Read more >
Migrate your database using Entity Framework Core ...
A migration bundle is a file produced by EF Core that can be used to apply migrations to a database. It was introduced...
Read more >
Applying Migrations - EF Core
Bundles. Migration bundles are single-file executables that can be used to apply migrations to a database. They address some of the shortcomings ...
Read more >
EF Core 6.0: Introducing Migration Bundles
In this post, let's have a look at a new feature that's coming with EF Core 6 in November, 2021. That's EF Core...
Read more >
Working with DevOps friendly EF Core Migration Bundles
The migration bundle is a self-contained executable with everything needed to run a migration. It accepts the connection string as a parameter ...
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