Giter VIP home page Giter VIP logo

evolve's Introduction

Evolve Build status Build Status NuGet

Database migration tool for .NET and .NET Core. Inspired by Flyway.

Evolve is an easy migration tool that uses plain old sql scripts. Its purpose is to automate your database changes, and help keep those changes synchronized through all your environments and development teams. This makes it an ideal tool for continuous integration / delivery.

Over all Evolve embraces simplicity. Every time you build your project, it will automatically ensure that your database is up-to-date, without having to do anything other than build. Install it and forget it!

Supported Databases

  • PostgreSQL
  • SQLite
  • SQL Server
  • MySQL / MariaDB
  • Oracle support (for .NET Framework only)

Supported Modes

  • MSBuild
  • In-app
  • .NET Core CLI tools (dotnet build)

Supported Frameworks

  • .NET 3.5+
  • .NET 4.5.1+
  • .NET Core 1.0+

Installation

PM> Install-Package Evolve

Quick Start

  1. Add a reference to the NuGet Evolve package in your project.
  2. Add at least those variables to your project configuration file and update their values according to your environment:

Example of an App.config / Web.config for a .NET project

<appSettings>
  <add key="Evolve.ConnectionString" value="Server=127.0.0.1;Port=5432;Database=my_db;User Id=postgres;Password=postgres;" />
  <add key="Evolve.Driver" value="npgsql" /> <!-- or sqlserver or microsoftdatasqlite or sqlite or mysql or mariadb -->
  <add key="Evolve.Locations" value="Sql_Scripts" />
  <add key="Evolve.Command" value="migrate" />
</appSettings>

Example of an evolve.json file for a .NET Core application

{
  "Evolve.ConnectionString": "Server=127.0.0.1;Database=Northwind;User Id=sa;Password=Password12!;",
  "Evolve.Driver": "sqlserver",
  "Evolve.Locations": "Sql_Scripts/SQLServer/Sql",
  "Evolve.Command": "migrate"
}
  1. Create a folder Sql_Scripts at the root of your project directory.
  2. And add your sql migration scripts following this file name structure. Example: V1_3_1__Create_table.sql:
  • prefix: configurable, default: V
  • version: numbers separated by _ (one underscore)
  • separator: configurable, default: __ (two underscores)
  • description: words separated by underscores
  • suffix: configurable, default: .sql
  1. Next time you build your project, Evolve will start and run your migration scripts automatically.

Please refer to the wiki pages for a complete documentation on how to master Evolve.

Feedback and issues

Feedback, improvements, ideas are welcomed. Feel free to create new issues at the issues section and/or send emails to [email protected]

Credits

Again, many thanks to the Flyway project. Great idea, big inspiration, a tool that I could not do without in .NET.

evolve's People

Contributors

lecaillon avatar leonborko avatar sacrelicious avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.