Getting Started


Evolve 2.0 is the first major rewrite version. It will help simplify the overall design by getting rid of the hard to maintain dynamic database driver loading. The benefits: a simpler code base, a simpler test infrastructure, more time to develop new features. Evole is now decoupled from its MSBuild part and fully compatible with .NET Standard 2.0


Evolve is available as a single NuGet package.

Install-Package Evolve

Quick Start

Initialize and configure Evolve to run when you start your application:

    var cnx = new SqliteConnection(Configuration.GetConnectionString("MyDatabase"));
    var evolve = new Evolve.Evolve(cnx, msg => _logger.LogInformation(msg))
        Locations = new[] { "db/migrations" },
        IsEraseDisabled = true,

catch (Exception ex)
    _logger.LogCritical("Database migration failed.", ex);

Create at least one folder at the root of your project for your migration scripts and named them following the pattern described here. For example: V1_3_1_1__Create_table.sql

Make sure to set the property Copy to output directory to Copy always on each of your migration script, or modify your csproj file to automatically copy all the SQL files to the output build folder:

  <Content Include="db\migrations\**\*.sql">

Note that since Evolve 2.1.0, you can embed your migration scripts into assemblies.