-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Migrations Bundles: Provide more info about the bundle #25872
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@bricelam will this be included or dropped for next version? I really can´t see how useful this is if we can´t see what´s "in the box". Imagine running this in a release pipeline with gated approvals? You need to know what is being run. But if not included could the following be a middle step? If it does then maybe I would create both and have the approval be on the script but when accepted I will run the exe. |
Yes, creating a script (especially with |
I´m still getting my head around bundles and what they solve so hope you can help me clarify something. There are problems with script as you point out here so will the bundles solve them and why? When you said bundles were "accurate representation" of scripts, my question is then if the bundle do/don't do more than just run the same thing? Are bundles just a self contained package (exe) that are just easy to work with?
Then if you already have a build pipeline in azure that creates scripts and runs them, with something like Azure SQL Database deployment task, then that's the same as bundles? Sorry if this question is too basic but there is not much to go on since this is all so new... |
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:
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. |
Will it be possible to do something like this?
|
See also #27723 for dry-run option. |
This seems very useful for when the bundle is distributed to a third party who isn't so familiar with the source code. Features like info about available migrations and even perhaps the migration history sound great. I have an open source project, delivered via a Docker image, which uses EF Core for DB access. I want to help my customers manage migrations without them needing to access or understand the project source. It has been suggested to me to use something like Liquibase but I'm also keen to see what migration bundles can offer.... |
SQL preview sounds great too but I realise that's in another issue.... #27723 . Basically stuff that allows a customer to manage migrations as they wish (preview, test, rollback etc) without involving the source or me in the loop, e.g. to generate scripts, is very helpful. |
Please consider this an emphatic vote for validating how a bundle will change a target. I'm looking for something like: 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. |
Currently involved in a sev 1 production outage. We are screwed because we can't see what was deployed and what wasn't. Will be recommending against the use of migration bundles until this is added. |
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)The text was updated successfully, but these errors were encountered: