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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T02:05:11+00:00 2026-05-17T02:05:11+00:00

I have a Ruby on Rails application that has two active environments, Stage and

  • 0

I have a Ruby on Rails application that has two active environments, Stage and Production. Our development team has been using Stage, but we would like to move our data onto the production server for various reasons. However, there are conflicting ID’s in the new database, so it’s not as simple as pulling the data from one location and inserting it into another. For example, say we have a table called Widgets:

Widget:
  id: 9836
  name: "Staging widget"
  parent_id: 9635
  container_id: 533

If the above data is one of our widgets, we can’t do the import because there is already a widget with ID 9836 and/or there is already a container with the ID 533, meaning we would need to crawl the association chain to construct new containers before putting widgets in them.

We are using MySQL databases for both environments. I thought about doing the import, and just adding 10,000 to all the appropriate columns that end in _id, as it would push us beyond the conflicting boundaries, but that seems like a bad solution.

Are there any tools, projects, or ideas that may help me solve this problem?

  • 1 1 Answer
  • 1 View
  • 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-17T02:05:12+00:00Added an answer on May 17, 2026 at 2:05 am

    If you can’t use negative ids simply add a number to all imported ids. The number has to be greater than maximum id from the destination database.

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

Sidebar

Related Questions

I have a Ruby On Rails Application that has been going for about 9
I have a Ruby on Rails project that has been untouched for a while,
I have a ruby on rails application with an input text field that has
I have a Ruby on Rails application that needs to find a home in
I have created a table in my Ruby on Rails application that I am
I have a RoR application (ruby v1.8.7; rails v2.3.5) that is caching a page
I have a Ruby on Rails application that I'm developing on my computer, which
I have a Ruby on Rails application that will be a CMS in way
Some of the users of our Ruby on Rails app have complained that page
I currently have a Ruby (Rails) application that needs to make a lot of

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.