Skip to content

Instantly share code, notes, and snippets.

View CarlosEspejo's full-sized avatar
🖖

Carlos Espejo CarlosEspejo

🖖
View GitHub Profile
@CarlosEspejo
CarlosEspejo / gist:4236663
Created December 7, 2012 21:26
indexing needed?
class CreateListProductInteractions < ActiveRecord::Migration
def change
create_table :list_product_interactions do |t|
t.integer :votes_up, default: 0
t.integer :votes_down, default: 0
t.integer :votes_activity, default: 0
t.integer :votes_total, default: 0
t.integer :list_id
t.integer :product_id