Sha256: 97d2724b26c5ca9275e1244d48409594f8978b25ea7dcc69c746f592715b2f8e
Contents?: true
Size: 469 Bytes
Versions: 6
Compression:
Stored size: 469 Bytes
Contents
class CreateComments < ActiveRecord::Migration def self.up create_table :comments do |t| t.string :title, :limit => 50, :default => '' t.text :comment t.belongs_to :commentable, :polymorphic => true t.belongs_to :person t.timestamps end add_index :comments, %w(person_id), :name => 'fk_comments_person' end def self.down remove_index :comments, :name => :fk_comments_person drop_table :comments end end
Version data entries
6 entries across 6 versions & 1 rubygems