I have developed a web application with fields Keyword,Latitude and Longitude. I want to add one more field called Radius to the web application.. How should i proceed.
Waiting for the reply,
Thanks in advance
I have developed a web application with fields Keyword,Latitude and Longitude. I want to add one more field called Radius to the web application.. How should i proceed.
Waiting for the reply,
Thanks in advance
really simple to do it. Simply do:
script/generate migration AddRadiusToAddress Radius:string
The example above supposed your model is called address, hence the "AddRadiusToAddress", but if your model is called something else, simply change address with that "something else"
And the field name in this case is radius, and I;m setting iut to be string, you might wanna change this as well.
After that, simply rung:
rake db:migrate
Hope this helps you.
UPDATE
And just for the sake of it, I thought I'd add an example of removing a field as well:
script/generate migration RemoveRadiusFromAddress role:string