A DNX runner for Fluent Migrator.
The nupkg is on Nuget.org, so simply run:
dnu install FluentMigrator.Runner.DNXAnd add the command with name FluentMigrator.Runner.DNX to your project.
Or add the runner to your project manually, here is an example project.json:
{
"version": "1.0.0-*",
"dependencies": {
"FluentMigrator": "1.5.1",
"FluentMigrator.Runner.DNX": "1.0.0-*"
},
"frameworks": {
"dnx451": { }
},
"commands": {
"migrate": "FluentMigrator.Runner.DNX"
}
}Or use the Package Manager in Visual Studio.
DNX provides a way to install global tools using the dnu commands install command. Simply run:
dnu commands install FluentMigrator.Runner.DNXYou will then have the fm tool available for you on the command line. The syntax is the same as if you had added the migrate command
described above on the dependency install.
If you use it as a tool you don't need to make any changes to the project.json file, you simply need the FluentMigrator dependency, so
you can reference its API to create migrations. No need to add the FluentMigrator.Runner.DNX dependency or the command to that file.
If you simply run dnx migrate the command line options will show up for you
dnx . migrate --provider sqlserver2012 --connectionString <yourconnectionstring>If you installed it as a global command, simply run the fm command:
fm --provider sqlserver2012 --connectionString <yourconnectionstring>Here are all the options:
Usage:
dnx . run --provider PROVIDER --connectionString CONNECTION [--assembly ASSEMBLY] [--output FILE] [--task TASK] [--migrateToVersion VERSION] [--profile PROFILE] [--tag TAG] [--verbose]
dnx . run --version
dnx . run --help
- Giovanni Bassi, aka Giggio, Lambda3, @giovannibassi
Contributors can be found at the contributors page on Github.
I am only on Jabbr most of the day, usually on the ASP.NET vNext room, with user name Giggio.
This software is open source, licensed under the Apache License, Version 2.0. See LICENSE.txt for details. Check out the terms of the license before you contribute, fork, copy or do anything with the code. If you decide to contribute you agree to grant copyright of all your contribution to this project, and agree to mention clearly if do not agree to these terms. Your work will be licensed with the project at Apache V2, along the rest of the code.