Re: [Rails] Re: Re: My First Ruby App
Do you have Data in that table .if not please Delete that table and run migrations. then run ruby script/server
If you have data or you do not want to delete them put the new fields in table which you want to create and then You have to define other fields in in you MVC separately that brings a lot of pain for you
On Fri, Jun 25, 2010 at 11:08 PM, RailsFan Radha <lists@ruby-forum.com> wrote:
hi rajeev
thanks for helping me out.
in the last section, i meant database.yml and not routes.rb. (my bad! it
was a slip of the tongue! )
I am in the prcess of re-reading your explanation.
At the first cut, as soon as i see the word migration, i feel like,...
"I don't want to do migration to my database. because, the columns exist
in my database already. "
Then why would i do migration?
I know i am missing something here. can't figure out what it is.
thanks a ton !
radha.
kannav rajeev wrote:
> I think there is a bit confusion in comunnication .As i understand i am
> writing the process here.
>
> ruby script/generate scaffold catogary
>
> then in yours applicaciotn db/migration you will find a migration Create
> catogaryAdd the field as you like or want .Something like that
>
> t.integer category_id int
> t.integer parent_category_id int
>
> then Do "*rake db:migrate"
>
> *
> *Or *
>
>
> Make saperate Controller model and views and run
>
> Ruby script/generate migration catogary or Ruby script/generate
> migration
> add_columns_to_catogary
>
> in yours applicaciotn db/migration you will find a migration Create
> catogary/or in add_columns_to_catogary
>
> Add the field as you like or want Something like that
>
> t.integer category_id int
> t.integer parent_category_id int
>
> then Do "*rake db:migrate*"
>
> *routes.rb file
> this file is modified to specify my mysql db name and username and
> password for accessing the database.*
> Please explain me how this happen *mysql db name and username and
> password for accessing the database were discussed in database.yml not
> in
> routes.rb
>
>
> *
>
> On Fri, Jun 25, 2010 at 6:06 PM, RailsFan Radha
> <lists@ruby-forum.com>wrote:
>
>> do u mean in the scaffold command or write here?>> user_modified varchar(45)
>>
>> 2) datatype specification. there is no way to specify datatypes.
>>
>> Is there a plugin for this purpose?
>> > any further help you need please explain with code
>> "Ruby on Rails: Talk" group.>> rubyonrails-talk+unsubscribe@googlegroups.com<rubyonrails-talk%2Bunsubscribe@googlegroups.com>
>> To post to this group, send email to rubyonrails-talk@googlegroups.com.
>> To unsubscribe from this group, send email to
>> .--
>> For more options, visit this group at
>> http://groups.google.com/group/rubyonrails-talk?hl=en.
>>
>>
>
>
> --
> Thanks:
> Rajeev sharma
Posted via http://www.ruby-forum.com/.
--
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.
--
Thanks:
Rajeev sharma
--
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.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home