Sha256: 701cc041efc95f15f302ddc535782b9983315866e451b1f9ceed54e302058f48

Contents?: true

Size: 546 Bytes

Versions: 2

Compression:

Stored size: 546 Bytes

Contents

class CreateComments < ActiveRecord::Migration
  def change
    enable_extension 'hstore'

    create_table :comments do |t|
      # t.string :title, :limit => 50, :default => "" 
      t.text :message
      t.references :commentable, polymorphic: true
      t.references :user, polymorphic: true, index: true
      t.string :role, default: nil
      t.hstore :related_attributes
      t.timestamps
    end

    add_index :comments, [:commentable_type, :commentable_id],
     name: :index_comments_on_commentable_type_and_commentable_id
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_commentable_more-1.1.0 test/dummy/db/migrate/20150114100411_create_comments.rb
acts_as_commentable_more-1.0.0 test/dummy/db/migrate/20150114100411_create_comments.rb