Sha256: 1db3e49657a34a487eb8eca99d4106536d4fce844c699392c1042283213284ac
Contents?: true
Size: 400 Bytes
Versions: 47
Compression:
Stored size: 400 Bytes
Contents
class CreateComments < ActiveRecord::Migration def self.up create_table :comments do |t| t.text :comment t.references :commentable, :polymorphic => true t.references :user t.timestamps end add_index :comments, :commentable_type add_index :comments, :commentable_id add_index :comments, :user_id end def self.down drop_table :comments end end
Version data entries
47 entries across 47 versions & 1 rubygems