Badgie.Migrator 0.2.0.318

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global Badgie.Migrator --version 0.2.0.318                
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 Badgie.Migrator --version 0.2.0.318                
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=Badgie.Migrator&version=0.2.0.318                
nuke :add-package Badgie.Migrator --version 0.2.0.318                

Badgie Migrator

A SQL migration tool originally built for Badgie

Installation

Install the migrator tool either as a global tool:

dotnet tool install -g Badgie.Migrator

...or as a CliToolReference in your project:

<ItemGroup>
    <DotNetCliToolPackageReference Include="Badgie.Migrator"/>
</ItemGroup>

Usage

Once the tool is installed you can simply call it like:

dotnet-badgie-migrator <connection string> [drive:][path][filename] [-f] [-i] [-d] [-n]
  -f runs mutated migrations
  -i if needed, installs the db table needed to store state
  -d:(SqlServer|Postgres) specifies whether to run against SQL Server or PostgreSQL
  -n avoids wrapping each execution in a transaction 

Alternatively, if you have many databases to run migrations against you can pass a json configuration file with many configurations:

dotnet-badgie-migrator -json=<configuration filename.json>

Here is a sample file to use as a template:

[
  {
    "ConnectionString": "Connection 1",
    "Force": true,
    "Install": true,
    "SqlType": "SqlServer",
    "Path": "Path 1",
    "UseTransaction": true
  },                      
  {
    "ConnectionString": "Connection 2",
    "Force": false,
    "Install": false,
    "SqlType": "Postgres",
    "Path": "Path 2",
    "UseTransaction": false
  }
]

Building

dotnet pack -c Release

Creates the DotNet CLI Tool package in App/bin/Relase/badgie-migrator.{version}.nupkg

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed. 
.NET Core netcoreapp3.1 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
1.3.356 12,300 5/9/2024
1.3.355 1,546 1/31/2024
1.2.354 147 1/31/2024
1.2.349 4,479 4/30/2023
1.2.348 427 4/21/2023
1.2.347 7,458 2/4/2023
1.1.0.346 366 2/4/2023
1.1.0.345 15,612 12/29/2022
1.1.0.344 370 12/29/2022
1.0.1.339 119,780 3/9/2022
1.0.1.338 505 3/9/2022
1.0.0.337 484 3/9/2022
1.0.0.336 620 3/8/2022
1.0.0.335 483 3/8/2022
1.0.0.334 109,326 6/5/2021
0.2.0.318 205,350 5/27/2020
0.2.0.316 24,892 3/20/2020
0.2.0.315 11,351 1/16/2020
0.2.0.314 571 1/16/2020
0.2.0.313 643 1/16/2020
0.2.0.312 612 1/16/2020
0.2.0.311 1,051 12/21/2019
0.2.0.310 571 12/20/2019
0.2.0.309 585 12/20/2019
0.2.0.308 606 12/19/2019
0.2.0.260 2,641 6/18/2019
0.2.0.256 630 6/14/2019
0.2.0.253 666 6/14/2019
0.2.0.250 636 6/13/2019
0.2.0.249 632 6/13/2019
0.2.0.248 648 6/13/2019
0.2.0.247 592 6/13/2019
0.1.0.246 568 6/13/2019
0.1.0.245 614 6/13/2019
0.1.0.244 618 6/13/2019
0.1.0 676 6/2/2019