asciinema.org/db/migrate/20120406114956_create_likes.rb

15 lines
329 B
Ruby
Raw Normal View History

2012-04-06 12:06:40 +00:00
class CreateLikes < ActiveRecord::Migration
def change
create_table :likes do |t|
t.integer :asciicast_id, :null => false
t.integer :user_id, :null => false
t.timestamps
end
add_index :likes, :asciicast_id
add_index :likes, :user_id
add_index :likes, [:user_id, :asciicast_id]
end
end