Is it possible to use Postgres schemas within a Rails app to separate
and data between two different apps?
I am thinking of combining two apps. I want to share some data (certain
tables) between them, but I want the migrations and other activities to
separated. I don’t want any table changes in one app to impact the
App 1 contains order entry. App 2 contains contact management. In App
want to access the order history for a customer/contact. So, I create
order model in App 2 and set the table name to include the schema…e.g.
However, I want both apps to have their own migrations. How do I tell
to use a particular schema when doing migrations, fixture loads, etc.?
The other reasonable option seems to be multiple database connections in
each app, which I haven’t investigated much yet. I have read a little
the “magic” multi-connection stuff. I am just thinking the schema thing
Postgres might be a cleaner (read…easier for me) solution.
Any tips, alternatives, or berating on why not to pursue this would be