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 6389793
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T03:26:53+00:00 2026-05-25T03:26:53+00:00

The general advice is I should always test my database migrations, but how to

  • 0

The general advice is I should always test my database migrations, but how to do it seems to be a well kept secret 😉

My chosen framework is FluentMigration.

What I think I want to do is:

  1. Migrate database to N-1.
  2. Save some data.
  3. Migrate database to N.
  4. Read data and verify it’s not lost.
  5. Verify other relevant changes

But I can’t figure out how to run the migrations from my unit tests.

  • 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-25T03:26:53+00:00Added an answer on May 25, 2026 at 3:26 am

    To kick off the migration in your integration tests just shell out to the migrate.exe command using Process.Start

    For example

    var migrator = System.Diagnostics.Process.Start("migrator.exe", "/connection \"Data Source=db\\db.sqlite;Version=3;\" /db sqlite /target your.migrations.dll");
    migrator.WaitForExit();
    

    If you’re using MSTest you’ll have to make sure that migrator.exe is included as a deployment item, or that you specify a path to where the .exe lives when you start the process.

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

Sidebar

Related Questions

The general advice is that you should not call GC.Collect from your code, but
I have a more general question but any advice in implementing this in C#
So I've seen this question , but I'm looking for some more general advice:
I'm looking for some general Optimization Correctness Extensibility advice on my current C++ Hierarchical
General Follow the same standards for all tests. Be clear about what each test
In general, what kinds of design decisions help an application scale well? (Note: Having
I'm fairly new to Zend Framework and MVC in general so I'm looking for
I need some advice as to how I easily can separate test runs for
I'm adding social integration to my app, and am looking for general advice how
After asking some general advice on shortest path algorithms ( 2D waypoint pathfinding: combinations

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.