You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20130713104233_create_custom_fields_roles.rb 520B

1234567891011121314
  1. class CreateCustomFieldsRoles < ActiveRecord::Migration[4.2]
  2. def self.up
  3. create_table :custom_fields_roles, :id => false do |t|
  4. t.column :custom_field_id, :integer, :null => false
  5. t.column :role_id, :integer, :null => false
  6. end
  7. add_index :custom_fields_roles, [:custom_field_id, :role_id], :unique => true, :name => :custom_fields_roles_ids
  8. CustomField.where({:type => 'IssueCustomField'}).update_all({:visible => true})
  9. end
  10. def self.down
  11. drop_table :custom_fields_roles
  12. end
  13. end