On 28 November 2011 11:28, Rebin Joseph <rebinkjoseph@gmail.com> wrote:
> Guys,
>
> I have experience with symfony frame work thats why asking the
> question here.Excuse me if I am wrong
>
> I have created a schema.rb file with definitions of 50 files and
> schema:load did creation of the tables.
>
> Now
>
> 1) I want to create models of these tables from schema.rb without
> entering the fields names in the command line. Is this possible?
> 2) I want to create controllers and views also with respect to it,
> possible??
>
> db:migrate will destroying my well defined database table structure.
> IS there any way to keep the schema.rb without overwriting it?
>
> Please let me know the answers asap
With that many tables probably the quickest way (if you cannot find it
already done by someone else) will be to write a script in whatever
language you are most comfortable, to create a set of commands like
rails generate scafffold <name> <field list with type>
This will generate everything, including migrations so you can start
with an empty database and run the migrations.
If you do this make sure to publish it so that others will not have to
repeat your work.
Colin
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment