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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T20:02:37+00:00 2026-06-01T20:02:37+00:00

I have been mucking with my development database and am getting ready to move

  • 0

I have been mucking with my development database and am getting ready to move it to production. I made some edits outside of rails, so I don’t have a migration for all of my changes. I know I can rake db:schema:dump to generate a schema.rb file, but can I apply that to an already populated production db without wiping the data? Something similar to rake db:schema:load without wiping the data?

If not, do I just need to manually create the migrations that would catch the production db up? If I do make those migrations, won’t all future calls to rake db:migrate on the dev box fail because the change in the migration already exists in the dev db?

  • 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-01T20:02:38+00:00Added an answer on June 1, 2026 at 8:02 pm

    The problem with rake db:schema:load is that it will forcefully create the tables, which you can see in db/schema.rb:

    create_table :users, :force => true do |t|
      # etc
    end
    

    What I would recommend is that you do create the missing migrations. You can fix your local dev database by adding the timestamps to the schema_migrations table manually. That is the consequence of changing your schema by hand.

    I personally always make sure that rake db:migrate:reset (drop all tables and migrate from scratch) will produce the same db/schema.rb as rake db:schema:dump would. Any change in the database schema must be automated by a migration. You could even make it part of your CI script, by running rake db:migrate:reset and than asserting that db/schema.rb didn’t change from what is in source control.

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

Sidebar

Related Questions

Have been looking on some tutorials for drawing canvas using SurfaceView, but the only
I have been mocking out some seam components using the following signature: @Name(myService) @Install(debug
I've been mucking around with python for a little while and I have recently
What is the purpose of mocking? I have been following some ASP.NET MVC tutorials
I have been mucking about with Java swing lately but it's butt ugly! Are
I have used the RhinoMocks product for quite some time and have been quite
I have been doing a lot of unit testing lately with mocking. The one
Have been looking at the MVC storefront and see that IQueryable is returned from
Have been studying the file system related classes of Adobe AIR 1.5, but so
Have been struggling with Javascript closure for a while trying to wrap brain around

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.