# frozen_string_literal: true

class CreateUxToolkitTrackerChecklistTemplates < ActiveRecord::Migration[6.1]
  def change
    create_table :ux_toolkit_tracker_checklist_templates do |t|
      t.integer :tracker_id, null: false
      t.integer :checklist_template_id, null: false
      t.timestamps
    end

    add_index :ux_toolkit_tracker_checklist_templates,
              :tracker_id,
              unique: true,
              name: 'index_ux_toolkit_tracker_templates_on_tracker'
    add_index :ux_toolkit_tracker_checklist_templates,
              :checklist_template_id,
              name: 'index_ux_toolkit_tracker_templates_on_template'
  end
end
