class CreateSubDisciplineContainers < ActiveRecord::Migration[5.2]
  def change
    create_table :sub_discipline_containers do |t|
      t.references :sub_discipline, index: true
      t.integer :container_id
      t.string :container_type

      t.timestamps
    end

    add_index :sub_discipline_containers, [:container_type, :container_id], name: "index_on_container"
  end
end
