Commit 01e7c969f8e07ceb23a33d8327641a8920fc3b56

Authored by Victor Costa
1 parent d58ef49a

Define an index name to avoid long names

db/migrate/20150702195735_create_tasks_categories.rb
1 1 class CreateTasksCategories < ActiveRecord::Migration
2 2 def up
3 3 create_table :proposals_discussion_plugin_task_categories, id: false do |t|
4   - t.belongs_to :task, index: true
5   - t.belongs_to :category, index: true
6   -
  4 + t.belongs_to :task, index: { name: 'proposals_discussion_plugin_tc_task_index' }
  5 + t.belongs_to :category, index: { name: 'proposals_discussion_plugin_tc_cat_index' }
7 6 end
8 7 end
9 8  
... ...