I want to create tables with foreign key through my migration script.
create_table :posts do |t|
t.string :title
end
create_table :comments do |t|
t.references :post
end
after rake db:migrate
, comments was not referred by post through id.
How to create this in rails-2.2.3?