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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T00:19:13+00:00 2026-06-05T00:19:13+00:00

I have an issue which I could not find answer for across the web.

  • 0

I have an issue which I could not find answer for across the web.

I am using CodeFirst EF 4.3.1 Migrations with MsSQL.

I have added several migrations and now I want to produce a script for upgrade/downgrade between two migrations.

For upgrade I run the following command which successfully reproduces an upgrade script:

PM> Update-Database -Script -SourceMigration:"201205161144187_AddPostAbstract" -TargetMigration:"201205161203310_BlogLimitsAndTableRename"

However, for downgrade I run the following command which fails with the following error:

PM> Update-Database -Script -SourceMigration:"201205161203310_BlogLimitsAndTableRename" -TargetMigration:"201205161144187_AddPostAbstract"
Scripting the downgrade between two specified migrations is not supported.

Any ideas how can I generate a downgrade script?

Thanks.

  • 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-06-05T00:19:15+00:00Added an answer on June 5, 2026 at 12:19 am

    It looks like migration API expects that you want to do downgrade only from “last version”.

    If BlogLimitsAndTableRename is your most recent migration (the last applied) you can simply run:

    Update-Database -Script -TargetMigration:"201205161144187_AddPostAbstract"
    

    If it is not your last migration you need to revert your development database to it first:

    Update-Database -TargetMigration:"201205161203310_BlogLimitsAndTableRename"
    

    and now you should be able to use the first command to get a script.

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

Sidebar

Related Questions

I have an issue which I could not find answer for across the web.
I have yet another issue which the answer is eluding me. I wish to
I have some issue regarding REST API which i have built using servicestack. End
This seems like a fairly simple issue, however I could not find any straight
This may have been answered elsewhere but I could not find a suitable response.
I have not been able to find an answer for this on Google. I
I have an issue which is one of those mysterious occurrences that seems to
I have an issue in which my mouseListener is unresponsive. I have tried to
i have a small issue which my text field insist to inhert the CSS
I am new here. And have a big issue which I will really appreciate

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.