20161105130633_create_statuses_tags_join_table.rb 245 B

12345678910
  1. # frozen_string_literal: true
  2. class CreateStatusesTagsJoinTable < ActiveRecord::Migration[5.0]
  3. def change
  4. create_join_table :statuses, :tags do |t|
  5. t.index :tag_id
  6. t.index [:tag_id, :status_id], unique: true
  7. end
  8. end
  9. end