asciinema.org/db/migrate/20120227230718_create_comments.rb
2012-03-04 21:15:27 +01:00

15 lines
330 B
Ruby

class CreateComments < ActiveRecord::Migration
def change
create_table :comments do |t|
t.text :body, :null => false
t.integer :user_id, :null => false
t.integer :asciicast_id, :null => false
t.timestamps
end
add_index(:comments, :asciicast_id)
add_index(:comments, :user_id)
end
end