Project

General

Profile

How to add column in existing table of a plugin?

Added by Mia S almost 11 years ago

How can I change my table which I created inside a plugin.. Like add new column or change datatype ?
I could not find the syntax for the same..


Replies (1)

RE: How to add column in existing table of a plugin? - Added by Mia S almost 11 years ago

Solution:

To change plugin model

1. rails generate migration change_data_type_for_tablename_columnname
2. make changes in the generated migration
3. rake redmine:plugins:migrate
4. rake db:migrate
5. changes will come in redmine/db/schema

    (1-1/1)