dbup-cli 1.7.0

.NET 5.0 .NET Core 2.1
dotnet tool install --global dbup-cli --version 1.7.0
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dbup-cli --version 1.7.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dbup-cli&version=1.7.0
nuke :add-package dbup-cli --version 1.7.0

DbUp Command Line Interface

NuGet

This project is inspired and based on DbUp project. That is how its authors describe their project:

DbUp is a .NET library that helps you to deploy changes to SQL Server databases. It tracks which SQL scripts have been run already, and runs the change scripts that are needed to get your database up to date. from official documentation

It does exactly that and does it pretty well, except that it supports not only SQL Server, but some other databases too. That is a great project that helps you a lot when you want to deploy database changes to your server, and you are a developer. Because it is merely a library and this is your responsibility to create an executable to run it. Of course, you can use PowerShell, but it is for fans only. Though it is pretty simple, however in every new project you have to create a new executable to deploy changes, and after the fifth project, it becomes a little annoying.

However, what if you are not a developer, or you are a lazy developer (in a good sense) who doesn't want to do the same thing in every new project? You can use DbUp-CLI that is already do it.

The tool has almost all the features the DbUp has, but without a single line of code, so I do not list them here, just the features of the tool itself.

Features

  • Almost all of the DbUp features
  • Cross-platform (dotnet needed)
  • Easy to install - can be installed as a dotnet global tool
  • Minimum command line options
  • Uses a configuration file to store deploy options, so you can put it along with your SQL scripts under your favorite source control system
  • Uses YAML format for a configuration file to improve readability
  • Quick start:
    • Creates a configuration file with default options for you
    • Default configuration is suitable for the most cases, so you should set only a connection string to your database to run the first migration
    • The configuration file contains all options with default values and a brief explanation

Documentation

Supported Databases

  • MS SQL Server
  • AzureSQL
  • PostgreSQL
  • MySQL
  • CockroachDB (by @lbguilherme)

Release Notes

Date Version Description
2022-06-11 1.7.0 Add support of CockroachDB, thanks to @lbguilherme
2022-05-10 1.6.6 Add support of .Net 6
2022-02-14 1.6.5 Support of DisableVars
2022-02-06 1.6.4 Support of drop and ensure for Azure SQL
2022-02-02 1.6.3 Support of AzureSQL integrated sequrity
2022-01-30 1.6.2 PostgreSQL SCRAM authentication support interim fix
2022-01-29 1.6.1 BUGFIX: 'version' and '--version' should return exit code 0
2021-10-03 1.6.0 Add a 'journalTo' option to dbup.yml
2021-03-28 1.5.0 Add support of .Net Core 3.1 and .Net 5.0
2021-03-27 1.4.0 Add script naming options<BR>Load .env.local after .env
2020-05-30 1.3.0 Support of MySQL, improve stability of integration tests
2020-03-20 1.2.0 Add a connectionTimeoutSec option
2019-08-27 1.1.2 Minor fixes
2019-04-11 1.1.0 PostgreSQL support
2019-03-25 1.0.1 Initial version (DbUp 4.2)
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.7.0 10,594 6/11/2022
1.6.6 2,662 5/10/2022
1.6.5 5,442 2/14/2022
1.6.4 484 2/6/2022
1.6.3 281 2/2/2022
1.6.2 172 2/2/2022
1.6.1 364 1/29/2022
1.6.0 7,194 10/3/2021
1.5.0 6,874 3/28/2021
1.4.0 189 3/27/2021
1.3.0 6,087 5/30/2020
1.2.0 2,850 3/20/2020
1.1.2 4,690 8/27/2019
1.1.0 558 4/11/2019
1.0.1 419 3/25/2019

Add support of .Net 6