From d7154d483269fc25d771d5b8b7b8a2c889e4b3f5 Mon Sep 17 00:00:00 2001 From: James Gifford Date: Mon, 12 Sep 2011 10:30:45 -0400 Subject: Added getting_started code, updated guide with link to rails github repo and path to code --- .../db/migrate/20110901012815_create_comments.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 railties/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb (limited to 'railties/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb') diff --git a/railties/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb b/railties/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb new file mode 100644 index 0000000000..adda8078c1 --- /dev/null +++ b/railties/guides/code/getting_started/db/migrate/20110901012815_create_comments.rb @@ -0,0 +1,12 @@ +class CreateComments < ActiveRecord::Migration + def change + create_table :comments do |t| + t.string :commenter + t.text :body + t.references :post + + t.timestamps + end + add_index :comments, :post_id + end +end -- cgit v1.2.3