# Update my Application

**URL:** <https://www.ruby-forum.com/t/update-my-application/116909>\
**Category:** Rails\
**Created:** [October 11, 2007, 1:44am UTC](https://www.ruby-forum.com/t/update-my-application/116909 "2007-10-11T01:44:57Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Osiro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f07891/32.png) [@Osiro](https://www.ruby-forum.com/u/Osiro)\
**Post date:** [October 11, 2007, 1:44am UTC](https://www.ruby-forum.com/t/update-my-application/116909/1 "2007-10-11T01:44:57Z")

</div>

Hi guys,

```
  I'm creating my forms without the scaffold script, and now, I

```

needed to add one more column in my table. But how can I update this?  
When I type something in this new text field, my database do not  
insert this new data.

Thanks,  
Osiro

---

<div class="post-metadata">

**Author:** ![Osiro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f07891/32.png) [@Osiro](https://www.ruby-forum.com/u/Osiro)\
**Post date:** [October 11, 2007, 3:40am UTC](https://www.ruby-forum.com/t/update-my-application/116909/2 "2007-10-11T03:40:26Z")

</div>

Hello,

I’m not totally clear what you mean. Once, you add a field to your  
table, you will also need to add a text field for it in your form\_tag  
or form\_for in your view. Can you post the code you’re using in your  
view with the form and also the code that performs the action.

Jason Arora

---

<div class="post-metadata">

**Author:** ![Osiro](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/o/f07891/32.png) [@Osiro](https://www.ruby-forum.com/u/Osiro)\
**Post date:** [October 11, 2007, 5:19am UTC](https://www.ruby-forum.com/t/update-my-application/116909/3 "2007-10-11T05:19:30Z")

</div>

As I understand your question, you need to do migration of the column  
like this

script/generate migration AddColumnToTable

in the 0\_0\_x\_add\_column\_to\_table.rb file in db/migrate you need to add  
this column using

add\_column :table\_name, :column\_name, :type(string, int, etc)

then you execute  
rake db:migrate

do not forget to update your views so they match with the new change

I wish I answered you
