I want to create a Project Custom Field in a plugin. Although running "rake redmine:plugins:migrate RAILS_ENV=production" appears to apply the migration, the project custom field is not created. Here is the migration:
Update: (can't answer my own Question so I'll fix the post with the answer).
class PopulateCustomFields < ActiveRecord::Migration
def self.up
ProjectCustomField.create(:name => 'Estimated time units'; :field_format => 'list', :possible_values => ['Hours', 'Points'], :default_value => 'Hours', :is_required => true, :editable => true, :visible => true)
end
(I previously had the wrong syntax for :possible_values, I was using {} instead of [], but no error was reported ).