2012-03-01 23:25:55 +00:00
|
|
|
class CreateComments < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :comments do |t|
|
2012-03-04 20:15:27 +00:00
|
|
|
t.text :body, :null => false
|
|
|
|
t.integer :user_id, :null => false
|
|
|
|
t.integer :asciicast_id, :null => false
|
2012-03-01 23:25:55 +00:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
|
|
|
add_index(:comments, :asciicast_id)
|
|
|
|
add_index(:comments, :user_id)
|
|
|
|
end
|
|
|
|
end
|