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

  • Home
  • SEARCH
  • 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 912589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:24:29+00:00 2026-05-15T17:24:29+00:00

This is a rails question about migration versions So i have a few migrations

  • 0

This is a rails question about migration versions

So i have a few migrations already existing. i.e. in my db/migrate/ folder i have some files like this:

  • 1_add_products.rb
  • 2_add_customers.rb
  • 3_add_addresses.rb
  • 4_add_tags.rb

and i’ve ran “rake db:migrate” so the current version is 4. I want to go back to version 2 permanently and start branching from there. So i did “rake db:migrate VERSION=2” and this reverted the changes correctly to reflect version 2. However, whenever i run “rake db:migrate” now, it runs all 4 of the migrations and puts me back at version 4.

Is there a way to permanently go back to one revision and then start branching newly from there? Can i just simply delete migration 3 & 4 after i roll back to version 2 ??

The reason I ask is because after i roll back to version 2, i need to add new migrations and run “rake db:migrate” and i definitely do not want migration 3 and migration 4 to be included.

  • 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-15T17:24:30+00:00Added an answer on May 15, 2026 at 5:24 pm

    Deleting should work just fine. Just make sure that you have it rolled back EVERYWHERE (development, staging, production) otherwise you’ll run into some weird problems.

    And yes, definitely rollback THEN delete, otherwise your database will think it’s in a state that doesn’t actually exist.

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

Sidebar

Related Questions

(This is really a newbie question about Rake & Rails & dependencies in general.
Here is one more newbie question: require 'tasks/rails' I saw this line in Rakefile
Sorry, if this is a noobish question, but I'm just getting started with Rails
I'm reading about Rails fixtures in this guide (thanks, trevorturk). It appears you define
I have a rails model that looks something like this: class Recipe < ActiveRecord::Base
My question is about rails rendering rule. if the the following line of code
I did find some questions on SO about Rails associations that are somewhat like
What is the purpose of this Rails config setting... config.action_controller.consider_all_requests_local = true It's set
I couldn't really find this in Rails documentation but it seems like 'mattr_accessor' is
I'm trying to work through this guide to Rails routing , but I got

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.