0

With Rails, adding columns is easy as this link:

Ruby on Rails: adding columns to existing database

With Redmine Plugin, adding columns for plugin's table seems OK as this link: http://www.redmine.org/boards/2/topics/39008

But in my Redmine Plugin, I want to add columns to Redmine's built-in table (for example, I want to add a column named 'my_own_syntax' to "queries" table). Can I do this?

2 Answers 2

2

To add migrations to your plugin create them under

your_newplugin_folder
|- db
   |- migrate
      |-01_fancy_migration.rb

Use numeration for migration files(in filenames but not in class names)

execute em with: rake redmine:plugins:migrate

Sign up to request clarification or add additional context in comments.

Comments

2

it is just a new migration

class AddMyOwnSyntaxToQueries < ActiveRecord::Migration
  def change
    add_column :queries, :my_own_syntax, :text
  end
end

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.