class CreateTags < ActiveRecord::Migration[5.0]
  def change
    create_table :tags do |t|
      t.string :name
      t.string :lowercase_name, index: {unique: true}

      t.timestamps
    end

    create_table :recipes_tags, id: false do |t|
      t.integer :recipe_id, index: true
      t.integer :tag_id, index: true
    end
  end
end
