Sha256: f0e3e14c4b571ad9636063d639060f272c9a808e570972d8a27866989b2646a6
Contents?: true
Size: 451 Bytes
Versions: 3
Compression:
Stored size: 451 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] add_index :comments, [:commentable_type, :commentable_id] end def self.down drop_table :comments end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
parole-0.1.4 | lib/generators/parole/templates/migration.rb |
parole-0.1.3 | lib/generators/parole/templates/migration.rb |
parole-0.1.2 | lib/generators/parole/templates/migration.rb |