Skip to content

Releases: AngelMunoz/Migrondi

Fix up/down commands for postgresql

19 Dec 06:41
Compare
Choose a tag to compare

What's Changed

  • A fix for #31

v0.7.0 Next milestone

10 Aug 05:19
Compare
Choose a tag to compare

Migrondi 0.7.0 had really big changes in it's architecture which will allow you in future version to use it as a library

Highlights

We're targeting .NET 6 now!

  • New Command! migrondi status -n SampleMigration_1628565399809.sql

    This command will let you know if a particular file is present in the database while it might not be very useful for cli users, this will allow the migrondi-vscode extension to report status by file inside vscode!

  • Improved output logs with more colors (thanks to Spectre.Console)

  • Added the following general flags

    • -j, --json ~ produces each line of the log as a json object (helpful if you're cosuming the stdout when invoked from other tools)
    • -nc, --no-color ~ if you are using migrondi in a CI/CD environment you might not need colors, so this will disable Spectre.Console coloring output

Breaking changes

While most of the public API for the CLI has been left untouched, we changed from CommandLineParser.FSharp to Argu which gives us a little bit more of flexibility, but we might have broken some things inadvertently I tried all of the commands personally but let me know if something slipped by

  • The --all flag has been removed, if you need every migration use -1 or 0 to get everything.
  • The up and down still run everything by default, but they do it as a dry-run by default to prevent accidental migrations, use --dry-run false to ensure you want to run your migrations against your database.

Here's the new --help menu:

USAGE: Migrondi.exe [--help] [--no-color [<bool>]] [--json [<bool>]] [<subcommand> [<options>]]

SUBCOMMANDS:

    init <options>        Creates basic files and directories to start using migrondi.
    new <options>         Creates a new Migration file.
    up <options>          Runs the migrations against the database.
    down <options>        Rolls back migrations from the database.
    list <options>        List the amount of migrations in the database.
    status <options>      Checks if a migration file is present in the database, this file has to be inside
                          "migrationsDir" from migrondi.json

    Use 'Migrondi.exe <subcommand> --help' for additional information.

OPTIONS:

    --no-color, -nc [<bool>]
                          Write to the console without coloring enabled.
    --json, -j [<bool>]   Output to the console with a json format.
    --help                display this list of options.

If you were using the list command inside a script, you will need to update it's usage

USAGE: Migrondi.exe list [--help] [--amount [<int>]] [--kind [<present|pending|both>]]

OPTIONS:

    --amount, -n [<int>]  Amount of migrations to get, defaults to 5.
    --kind, -k [<present|pending|both>]
                          Which migrations should be listed, defaults to "pending".
    --help                display this list of options.

All of the above are related to #20 #21 #22

Bump Deps

30 Jul 06:11
Compare
Choose a tag to compare

This release bumps dependencies and provides a macOS binary this will be the last release targeting netcoreapp3.1 (unless bugs are reported), once .NET6 is out it will be updated accordingly

Dry Run

26 Dec 18:26
Compare
Choose a tag to compare

This release includes a new option for the up and down commands!
you can now type

  • migrondi up --dry-run true
  • migrondi up -d true
  • migrondi down --dry-run true
  • migrondi down -d true

This will print out to the console what is exactly going to run against your database

Allow Complex Filenames

19 Dec 16:25
Compare
Choose a tag to compare

Thanks to @VitorRigoni now you should be able to use more flexible names for your migrations

examples

  • my_migration_is_nice_1608393986966.sql
  • my-migration_is_nicer-48984_123_1608393986966.sql
  • 123123__asasd_123123---___#_1608393986966.sql

not that you should use names like the last one but you can have more than 1 underscore in your migrations

Exit correctly on up command failure

11 Dec 02:31
Compare
Choose a tag to compare

This release includes a fix to the exit code applied when the application had exceptions, not every case was covered by exit(1)
Thanks to @VitorRigoni to point this out and send a PR

init fix

08 Sep 14:09
Compare
Choose a tag to compare
init fix Pre-release
Pre-release

fixes an issue when creating the init configuration the migrationsDir property was "/' instead of "migrations/"

for .net users you can now install via nuget global tool
dotnet tool install --global Migrondi --version 0.4.1

Init command

14 Apr 06:58
Compare
Choose a tag to compare
Init command Pre-release
Pre-release

Adds a init command useful when you are starting from scratch that gets you ready to start working

Add nupkg to install it as a dotnet tool

Rename to Migrondi

12 Apr 20:41
Compare
Choose a tag to compare
Rename to Migrondi Pre-release
Pre-release

Basically this is just a "rename" of the project I found out some products names as "Sqlator" and I don't want to deal with that
I decided to put the binaries inside a zip folder, just uncompress and put it in your path to start working with it

Multiple Databases!

12 Apr 04:56
39818eb
Compare
Choose a tag to compare
Multiple Databases! Pre-release
Pre-release

Removed Dapper and the F# wrapper in favor of RepoDb.

This allows basic support for SQL Server, MySQL, SQLite, PostgreSQL
I have manually tested in MySQL, SQLite as well as PostgreSQL

If you find a bug or missing a feature, please let me know