Sha256: b24f1472e9a1a24d9efb9f4b5ba045ca09f580cb55f24807095a154ad9576de9

Contents?: true

Size: 389 Bytes

Versions: 1

Compression:

Stored size: 389 Bytes

Contents

class AddParole < ActiveRecord::Migration
  def self.up
    create_table :comments do |t|
      t.references :commentable, polymorphic: true
      t.references :commenter, polymorphic: true
      t.string :role
      t.text :comment

      t.timestamps
    end

    add_index :comments, [:commentable_type, :commentable_id, :role]
  end

  def self.down
    drop_table :comments
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
parole-0.1.1 lib/generators/parole/templates/migration.rb