chef/supermarket

View on GitHub
src/supermarket/db/migrate/20140324144915_create_cookbook_followers.rb

Summary

Maintainability
A
25 mins
Test Coverage
class CreateCookbookFollowers < ActiveRecord::Migration
  def change
    create_table :cookbook_followers do |t|
      t.integer :cookbook_id, null: false
      t.integer :user_id, null: false

      t.timestamps
    end

    add_index :cookbook_followers, [:cookbook_id, :user_id], unique: true
  end
end