aboutsummaryrefslogtreecommitdiffstats
path: root/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb
diff options
context:
space:
mode:
Diffstat (limited to 'guides/code/getting_started/db/migrate/20130122045842_create_comments.rb')
-rw-r--r--guides/code/getting_started/db/migrate/20130122045842_create_comments.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb b/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb
new file mode 100644
index 0000000000..3e51f9c0f7
--- /dev/null
+++ b/guides/code/getting_started/db/migrate/20130122045842_create_comments.rb
@@ -0,0 +1,11 @@
+class CreateComments < ActiveRecord::Migration
+ def change
+ create_table :comments do |t|
+ t.string :commenter
+ t.text :body
+ t.references :post, index: true
+
+ t.timestamps
+ end
+ end
+end