forked from fluentmigrator/fluentmigrator
-
Notifications
You must be signed in to change notification settings - Fork 1
Migration Runners
schambers edited this page Sep 14, 2010
·
15 revisions
There are multiple different ways to execute migrations using the runners. The simplest and most straight forward is from the command line using the migrate.exe tool.
<?xml version="1.0" encoding="UTF-8" ?>
<project name="fluentmigrator" xmlns="http://nant.sf.net/release/0.85/nant.xsd" default="migrate">
<loadtasks assembly="../../build/FluentMigrator.NAnt.dll" />
<target name="migrate" description="Migrate the database to the latest version">
<migrate
database="sqlite"
connection="Data Source=:memory:;Version=3;New=True;"
namespace="FluentMigrator.Tests.Integration.Migrations.Interleaved.Pass3"
target="../../build/FluentMigrator.Tests.dll"
/>
</target>
<target name="migrate-rollback" description="Migrate the database back one version">
<migrate
database="sqlite"
connection="Data Source=:memory:;Version=3;New=True;"
namespace="FluentMigrator.Tests.Integration.Migrations.Interleaved.Pass3"
target="../../build/FluentMigrator.Tests.dll"
task="rollback"
/>
</target>
<target name="migrate-rollback-all" description="Migrates the database back to original state prior to applying migrations">
<migrate
database="sqlite"
connection="Data Source=:memory:;Version=3;New=True;"
namespace="FluentMigrator.Tests.Integration.Migrations.Interleaved.Pass3"
target="../../build/FluentMigrator.Tests.dll"
task="rollback:all"
/>
</target>
</project>
- Getting FluentMigrator
- How to create a Migration
- Fluent Interface
- Migration Runners
- Use inbuilt database functions when setting the default value
- Sql Server Specific Extensions
- Raw Sql Helper for inserting data
- Auto Reversing Migrations
- Resharper File Template
- Transaction Modes for the Migration Runner
- ApplicationContext: Passing parameters to Migrations
- Dealing with Multiple Database Types
- Filter migrations run based on Tags
- Enforce migration version numbering rules
- Create custom metadata for the VersionInfo table