Migrations 1.0.1

Migration manager

Install-Package Migrations -Version 1.0.1
dotnet add package Migrations --version 1.0.1
<PackageReference Include="Migrations" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Migrations --version 1.0.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

Release Notes

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/

This package is not used by any popular GitHub repositories.

Version History

Version Downloads Last updated
1.0.1 12,245 12/23/2015