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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T03:20:37+00:00 2026-06-03T03:20:37+00:00

I have two apps on Heroku and I would like them to use the

  • 0

I have two apps on Heroku and I would like them to use the same dedicated database. The problem is that this new app has the same models/tables than the other one.

My questions are:

  • Should I change the name for the tables on the new app?

  • If yes, what about the name of my models? Is it possible to map a model with a table with a different name? (Like User model with new_user table instead of user).

Any good advices on how to do this will be appreciated.

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-03T03:20:39+00:00Added an answer on June 3, 2026 at 3:20 am

    In general this is probably not as good an idea as it may seem. Rails is designed to assume it has 100% control over the database.

    Even if you are able to get your tables separated and not colliding, you will still have challenges with the schema_migrations table. That table holds all the migrations for rails and would contain a mix of all migration records for both applications. This would confuse the apps whenever, for example, you tried to run rake db:rollback or other rake commands.

    There could also be issues with having your schema.rb file potentially get out of synch between the two applications.

    I’d recommend looking hard at the reasons you want to share the database and see if there are other ways to accomplish what you are trying to do. For example, you might consider using Active Resources to connect the applications restfully.

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

Sidebar

Related Questions

I have two apps that both access the same database. The first has clients
I have two apps that use custom URL schemes to switch between each other.
I have a problem with iAd. I have two apps: let's call them AAA
So this isnt specific to a code sample, but we have two apps, that
I have two Grails apps developing in the same time that needs to comunicate
I have two apps (free & paid) that are exactly same except for ad
I have two apps that use Integrated Security. One assigns Integrated Security = true
I have two other apps that use a ListView and SimpleCursorAdapter . The code
I have two apps for Ios that are having the same errors when ran
I have two apps, both of which force the user to use the iPhone

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.