Topic: Does Rails need to know everything about a database?

(using rails 3.1)
I ask this because I am developing a timecard interface (in Rails) to an existing accounting system which manages employee hours, grants and projects-billed-to.

Since I am making some small changes to the existing system to work with rails, I thought I would do the following:
- start building the new database with Rails migrations of the data structures Rails needs to know about.
- after the data structures needed by the Rails app have been created, use postgreSQL to add the remaining fields (ex. employee health care benefits, dependents, gender etc.) and tables used by accounting but not used by the Rails interface.

Is this going to work for Rails, or is Rails going to throw a fit because of the stuff in the database it doesn't know about?

Thanks for any help you can offer.  --Fred

Re: Does Rails need to know everything about a database?

Rails only needs to know
1) how to connect to the database
2) what you tell it it smile

There are a couple of caveats to that in that rails expects certain conventions to have been used such as auto increment primary keys with the name of id and table names to match the model names but you can override this.

Can I suggest you just try connecting a new rails app to your existing db and provide a model, views and controller to match just one of the tables in the existing db and you will see how it works. You might just be pleasantly surprised smile

What you want and what you need are too often not the same thing!
When your head is hurting from trying to solve a problem, stop standing on it. When you are the right way up you will see the problem differently and you just might find the solution.
(Quote by me 15th July 2009)