Skip to content

Releases: AngelMunoz/Migrondi

v1.0.0-beta-011

31 Oct 23:22
Compare
Choose a tag to compare

What's Changed

  • Allow reading configuration values from Environmental variables and CLI flags
  • Migrondi - v1.0.0 by @AngelMunoz in #32

Full Changelog: v1.0.0-beta-010...v1.0.0-beta-011

v1.0.0-beta-010

18 Feb 05:27
Compare
Choose a tag to compare
  • Allow manual handling of transactions
  • update dependencies
  • if a rollback is empty, stop there.
    • known issue: if the rollback is made of comments it will still try to run

Full Changelog: v1.0.0-beta-009...v1.0.0-beta-010

v1.0.0-beta-009

17 Feb 23:26
Compare
Choose a tag to compare

This release adds the Microsoft.Extensions.Logging package to hide some details of the creation of an IMigrondi instance when using the library code.

Breaking Changes

Change the signature of MigrondiFactory to avoid asking extra information and orchestration from users.

previously

let factory = Migrondi.MigrondiFactory(logger)

let config = MigrondiConfig.Default

let rootDir =
  Uri(__SOURCE_DIRECTORY__ + $"{Path.DirectorySeparatorChar}", UriKind.Absolute)

let migrationsDir =
  Uri(Config.ensureWellFormed config.migrations, UriKind.Relative)

let migrondi = factory.Invoke(config, rootDir, migrationsDir)

Now:

let config = MigrondiConfig.Default

let migrondi = Migrondi.MigrondiFactory(config, ".")

On the follwing releases that MigrondiFactory name may be changed to simply Create

Full Changelog: v1.0.0-beta-008...v1.0.0-beta-009

v1.0.0-beta-008

08 Feb 17:48
Compare
Choose a tag to compare

Woops... I also missed a method on the public API on the last release, here's the good one!

As I was saying before:
This Version adds a small convenience API that was missing on the IMigrondi interface
Now it should be very simple to create and run migrations programmatically, here's an example how you can create and run migrations from an F# script!

#r "nuget: Migrondi.Core, 1.0.0-beta-008"
#r "nuget: Microsoft.Extensions.Logging"
#r "nuget: Microsoft.Extensions.Logging.Console"

open System
open System.IO
open Migrondi.Core

open Microsoft.Extensions.Logging

module Config =
  let getLogger loggerName =
    let loggerFactory =
      LoggerFactory.Create(fun builder ->
        builder.SetMinimumLevel(LogLevel.Debug).AddSimpleConsole() |> ignore
      )

    loggerFactory.CreateLogger loggerName

  let ensureWellFormed (migrationsDir: string) =
    // when you're using URIs "./path" is not the same as "./path/"
    // the first one is a file and the second one is a directory
    // so ensure you always end your paths with a directory separator

    if Path.EndsInDirectorySeparator(migrationsDir) then
      migrationsDir
    else
      $"{migrationsDir}{Path.DirectorySeparatorChar}"


let logger = Config.getLogger("sample-app")
let factory = Migrondi.MigrondiFactory(logger)

let config = MigrondiConfig.Default

let rootDir =
  Uri(__SOURCE_DIRECTORY__ + $"{Path.DirectorySeparatorChar}", UriKind.Absolute)

let migrationsDir =
  Uri(Config.ensureWellFormed config.migrations, UriKind.Relative)

let migrondi = factory.Invoke(config, rootDir, migrationsDir)


// Let's create a new Migration, since this is just an I/O operation
// there's no need to initialize the database yet, but ideally
// you would want to do that anyways for safety
migrondi.RunNew(
  "add-test-table",
  "create table if not exists test (id int not null primary key);",
  "drop table if exists test;"
)

// Before we can talk to the database we need to initialize the migrondi object
// this will ensure that the migrations directory exists, and the required pieces
// of information are available in the database to see if it is ready to accept migrations.
migrondi.Initialize()

// once that the migrondi service is initialized we can try to commmunicate to the
// database and in this case go for a dry run
let applied = migrondi.DryRunUp()

logger.LogInformation(
  $"List of the migrations that would have been ran:\n\n%A{applied}"
)

Full Changelog: v1.0.0-beta-006...v1.0.0-beta-008

v1.0.0-beta-007

08 Feb 17:12
Compare
Choose a tag to compare
v1.0.0-beta-007 Pre-release
Pre-release

This Version adds a small convenience API that was missing on the IMigrondi interface
Now it should be very simple to create and run migrations programmatically, here's an example how you can create and run migrations from an F# script!

Please ignore this release and check the notes on v1.0.0-beta-008

Full Changelog: v1.0.0-beta-006...v1.0.0-beta-007

v1.0.0-beta-006

11 Oct 14:50
Compare
Choose a tag to compare
v1.0.0-beta-006 Pre-release
Pre-release

This release doesn't add up much, I'm drive testing the library portion of this project in https://github.com/AngelMunoz/MigrondiUI so once I get in better shape for that project, I'll start tweaking parts of the API before moving to RC stage.

Add missing helpers for the MigrondiDriver type as well as removing an extra namespace in the Migrondi file.

Full Changelog: v1.0.0-beta-005...v1.0.0-beta-006

v1.0.0-beta-005

04 Oct 04:28
Compare
Choose a tag to compare
v1.0.0-beta-005 Pre-release
Pre-release

This release is to switch out some Public API names and switch the factory functions to classes

I'm dogfooding this project from a C# application and found a few issues and weirdness from using the library side that I'm trying to address with these changes.

And also added a simpler way to initialize the migrondi service (in case you don't care about the internal services of migrondi

F# Code

let migrondiFactory = Migrondi.MigrondiFactory(logger)
let migrondi: IMigrondi = migrondiFactory.Invoke(config, projectRoot, migrationsDir)
migrondi.DryRunUp()

C# code

var migrondiFactory = Migrondi.MigrondiFactory(logger);

IMigrondi migrondi = migrondiFactory(sconfig, rootProject, migrationsDir);
migrondi.DryRunUp();

Full Changelog: v1.0.0-beta-004...v1.0.0-beta-005

v1.0.0-beta-004

02 Oct 23:31
Compare
Choose a tag to compare
v1.0.0-beta-004 Pre-release
Pre-release

Changes in this version

  • Serialization API
    • Split into Configuration Serializer and Migration Serializer - this was made in order to make it easier to construct the services and replace them individually where needed vs the previous API that required a nested set of interfaces to get to the correct API
  • Migrate from the internal async implementation to IcedTasks - Iced tasks keeps the benefit of using a performant Task-based API keeping the benefits of the async model from F# so there's less Async <-> Task conversion interop
  • Implement the missing bits of the Migrondi Service's Async API so you can start coding against it!
     
    Also, docs are starting to get in shape I think there's less things to worry about now and if I don't get any crazy ideas we might get an RC version soon.

Full Changelog: v1.0.0-beta-003...v1.0.0-beta-004

Updates to Public API

01 Oct 14:17
Compare
Choose a tag to compare
Updates to Public API Pre-release
Pre-release

In the last preview for some reason I forgot to add and update the signature files to properly limit the public API of the Core project

This should be fixed now and should reflect the current desired public API offering

Full Changelog: https://github.com/AngelMunoz/Migrondi/compare/v1.0.0-beta-001..v1.0.0-beta-003

Update Public API

01 Oct 06:58
Compare
Choose a tag to compare
Update Public API Pre-release
Pre-release

Renamed a few APIs to to make naming consistent

Full Changelog: v1.0.0-beta-001...v1.0.0-beta-002