Thanks a million to Scott, Hassan, & Colin, for this rich feast of 
possibilities!  It's gonna take me some time to digest.  Then I'll be back 
with the solutions I'm finding and/or with more questions.

~ Ken

On Friday, May 22, 2015 at 3:44:34 PM UTC-4, kenatsun wrote:
>
> I'm evaluating Rails (vs Django) for a new project.  A requirement of this 
> project is that the Rails app(s) be able to work with a database 
> (PostgreSQL, in case that matters) whose schemas (table definitions) have 
> been created and, over time, will be modified independently of the Rails 
> app(s).
>
> Though I'm a newbie to Rails, it already seems to be that Rails' standard 
> mode of operation is:  (1) Models are created and modified within Rails, 
> and then (2) Rails Migration creates and modifies the database table 
> definitions.
>
> What I need is the opposite sequence:  (1) The database table definitions 
> are created and modified through tools external to Rails, and then (2) the 
> Rails models are created and modified to fit the database table definitions.
>
> So my questions are:
>
> 1.  First and most important, is there a Gem (or some other tool in the 
> Ruby-Rails world) that can generate a model from a database table 
> definition?
> 2.  If not, presumably one could use Rails on a pre-existing database by 
> manually editing the Rails models.  Right?
> 3.  If that's right, what are the requirements for the table designs to 
> enable them to work as viable Rails models?  It seems that one requirement 
> is that each table have a sequence-assigned primary key named "id".  
> Right?  Any others?
>
> ~ Thanks in advance
> ~ Ken
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/fa6be845-28f0-49a4-917e-397ec9e7ad79%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to