Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6920617
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:10:14+00:00 2026-05-27T10:10:14+00:00

I am attempting to get migrations working with my project using fluent migrator. But

  • 0

I am attempting to get migrations working with my project using fluent migrator. But due to the lack of documentation I am struggling to figure out how to rollback and have the Down method called for my migration class.

I set up the db with an initial version 1 class:

[Migration(1)]
public class Baseline : Migration
{
    public override void Up()
    {
        Execute.Script("1_Baseline\\baseline.sql");
    }

    public override void Down() { }
}

I am running migrations via a batch file containing the following:

“….\tools\fluentmigrator\migrate.exe” –connection “Data
Source=.\sqlexpress;Initial Catalog=ekmDomains;Integrated
Security=true;multipleactiveresultsets=true;” –db SqlServer2005
–target “bin\Release\EkmDomains.Migrations.dll”

This works fine. So I then wrote a second migration class just to test it out:

[Migration(2)]
public class AddNewTable : Migration
{
    public override void Up()
    {
        Create.Table("NewTable").WithColumn("name").AsString();
    }

    public override void Down()
    {
        Delete.Table("NewTable");
    }
}

Again after running the batch file, everything works ok. I then looked at the command line options for the fluent migrator tool, and saw a --version option. I assumed that to rollback to a previous version I would simply supply --version 1 and the Down of AddNewTable would be called. That, however, did not happent. The console simply displays a ‘committing transaction` method then closes. But the table has not been deleted and the version number hasn’t changed.

Am I doing this the wrong way or can anyone see some fundamental flaw in how I am doing this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T10:10:15+00:00Added an answer on May 27, 2026 at 10:10 am

    To migrate down, you use -t migrate:down. Besides down and up, the help for migrate.exe also lists rollback, rollback:toversion and rollback:all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to get google-toolbox-for-mac working with my existing XCode 3.2 iPad project, but
I'm attempting to get my first ASP.NET web page working on windows using Mono
I'm attempting to get the height of an element using jQuery, but am receiving
I am attempting to get my arms around some basic prolog but struggling a
I'm attempting to get my feet wet with python on Project Euler, but I'm
While attempting to get an old svn dump of a project under git control,
I am attempting to get Memory leak detection working with the help of these
Currently attempting to get some code to compile using Lejos for the Lego NXT
I am attempting to get a Native C/C++ library working with Monodroid in the
I'm attempting to get my first hello world rails example going using the rails'

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.