DbUpdater.EFCore.CLI
1.0.7
See the version list below for details.
dotnet add package DbUpdater.EFCore.CLI --version 1.0.7
NuGet\Install-Package DbUpdater.EFCore.CLI -Version 1.0.7
<PackageReference Include="DbUpdater.EFCore.CLI" Version="1.0.7" />
paket add DbUpdater.EFCore.CLI --version 1.0.7
#r "nuget: DbUpdater.EFCore.CLI, 1.0.7"
// Install DbUpdater.EFCore.CLI as a Cake Addin #addin nuget:?package=DbUpdater.EFCore.CLI&version=1.0.7 // Install DbUpdater.EFCore.CLI as a Cake Tool #tool nuget:?package=DbUpdater.EFCore.CLI&version=1.0.7
Introduction
The DbUpdater.EFCore.CLI is a command line tool that can be used to persist database migrations to the database. The project stems from the idea to include both code-first entities and SQL-based scripts in the same code repository and CI/CD process. while code-first migrations can be persisted by calling the Update-Database
command, this is not feasible when the code have been published. We never want to point to production using visual studio in an enterprise environment. DbUpdater.EFCore.CLI enables all your code to live within the same code base and also allows all deployments (code and data) to be implemented through the same CI / CD pipeline. The DbUpdater.EFCore.CLI make provisions for migrations, script execution and custom data seeding instead of using the builder.HasData
method from the Migration builder.
Installation
Installing DbUpdater.EFCore.CLI via Package Manager Console
Install-Package DbUpdater.EFCore.CLI
Install via dotnet cli
dotnet add package DbUpdater.EFCore.CLI
Usage
See https://github.com/oakinyelure/DbUpdater/wiki/DbUpdater.EFCore.CLI
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
-
net6.0
- CommandLineParser (>= 2.9.1)
- Microsoft.AspNetCore.Hosting.Abstractions (>= 2.2.0)
- Microsoft.EntityFrameworkCore (>= 6.0.12)
- Microsoft.EntityFrameworkCore.SqlServer (>= 6.0.12)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
v1.0.0
- Simple IHost extension to add CLI support. Can be used without CLI but with performance overhead
- Added support for code-first migration
- Added support for script execution through EF
- Added support for seeding with custom logic
---
v1.0.4
- Added TypeLookup to help look up type from IServiceScope instance and assemblies present in the App domain
- Added unit test project
- Fixed bug in the seed migration using the DbContext assembly instead of the actual data context assembly
v1.0.5
- Removed setter for the AbstractContextSeeder.Order property. This is not needed. Could be added when there is a need for it
- Updated the migrator to include seeding and script execution post constructor initialization
- Removed verbose note when the updater is called. It's not necessary. Users are able to use the help argument to display help
- Updated the type lookup class to include method for getting all seedable objects
v1.0.6
- Added ability to continue executing other script when one script fails to execute
- Added ability to rollback transactions when a script fails. Successful transactions will be committed
- Added information to script execution so that the name of the script is visible on the console before execution.