Sha256: 85ab5bbe145532dcbf711fd6c0dbd9a07fbf9b8c1a2692b887145447e24e9e05

Contents?: true

Size: 429 Bytes

Versions: 10

Compression:

Stored size: 429 Bytes

Contents

class AddCommentsTables < ActiveRecord::Migration
  def self.up
    create_table :comments do |t|
      t.column :title, :string
      t.column :comment, :string
      t.references :commentable, :polymorphic => true
      t.references :user
      t.references :recipient
      t.timestamps      
    end

    add_index :comments, ["user_id"], :name => "fk_comments_user"
  end

  def self.down
    drop_table :comments
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
community_engine-3.2.0 db/migrate/006_add_comments_tables.rb
community_engine-3.0.0 db/migrate/006_add_comments_tables.rb
community_engine-2.3.2 db/migrate/006_add_comments_tables.rb
community_engine-2.3.1 db/migrate/006_add_comments_tables.rb
community_engine-2.3.0 db/migrate/006_add_comments_tables.rb
community_engine-2.1.0 db/migrate/006_add_comments_tables.rb
community_engine-2.0.0 db/migrate/006_add_comments_tables.rb
community_engine-2.0.0.beta3 db/migrate/006_add_comments_tables.rb
community_engine-2.0.0.beta2 db/migrate/006_add_comments_tables.rb
community_engine-2.0.0.beta1 db/migrate/006_add_comments_tables.rb