Migrations 1.0.1
dotnet add package Migrations --version 1.0.1
NuGet\Install-Package Migrations -Version 1.0.1
<PackageReference Include="Migrations" Version="1.0.1" />
paket add Migrations --version 1.0.1
#r "nuget: Migrations, 1.0.1"
// Install Migrations as a Cake Addin #addin nuget:?package=Migrations&version=1.0.1 // Install Migrations as a Cake Tool #tool nuget:?package=Migrations&version=1.0.1
Migration manager
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net40-client is compatible. |
-
- log4net (>= 2.0.5)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated |
---|---|---|
1.0.1 | 41,726 | 12/23/2015 |
This package will allow manage your database schema by running version scripts on application startup. The sql script will run once on startup of your application.
1. Add Migrations to your project
Add a directory Migrations, and add the sql scripts to the directory. Call the scripts 1, 2, 3 etc(or dates like 201521121242). Scripts will run in asc order and only once (numbers only). Embed the scripts as embedded resource in the dll. Make sure your go statements are at the end of the lines.
2. Mark the dll as Mirgration assembly
To pickup the migrations add the following attribute to your dll (with embedded migration files):
[assembly: Migrations.Config.SqlServerMigration()]
3. Call the migrations on startup
Add the following line of code in your startup sequence:
MigrationManager.RunMigrations();
Version 1.0.1
Support from version .net 4.0 and up
For more information see:
https://pgroene.wordpress.com/2016/01/09/managing-sql-server-migrations/