Skip to content

Latest commit

 

History

History
50 lines (36 loc) · 1.67 KB

File metadata and controls

50 lines (36 loc) · 1.67 KB

FluentMigrator

FluentMigrator is a popular OSS framework that is not dependant on any specific data access technology. It is capible of running against a whole host of relation database platforms. Migrations are code based and schema is defined using a fluent interface. It supports both targeted upgrading and downgrading. Migrations can be executed from the command line or several other task based libraries.

About

Installation

Install-Package FluentMigrator

Example Migration

using FluentMigrator;

namespace Migrations.FluentMigrator.Migrations
{
    [Migration(1)]
    public class InitMigration : Migration
    {
        public override void Up()
        {
            
        }

        public override void Down()
        {
            
        }
    }
}

CLI Based Execution

.\packages\FluentMigrator.1.6.2\tools\Migrate.exe `
 /connection "Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=FluentMigrator;Integrated Security=True;" `
 /provider SqlServer2014 `
 /assembly src\Migrations.FluentMigrator\bin\Debug\Migrations.FluentMigrator.dll `
 /verbose true