Sha256: f43cb6db741fab7acd459ef66412fd30bf6be590a8f3f28519930b2847551e34

Contents?: true

Size: 701 Bytes

Versions: 243

Compression:

Stored size: 701 Bytes

Contents

class CreateComments < ActiveRecord::Migration
  def self.up
    create_table :comments, :force => true do |t|
      t.integer   :commentable_id, :default => 0
      t.string    :commentable_type, :limit => 15, :default => ""
      t.text      :body
      t.integer   :user_id, :default => 0, :null => false
      t.integer   :parent_id
      t.integer   :lft
      t.integer   :rgt
      t.integer   :is_denied,        :default => 0,     :null => false
      t.boolean   :is_reviewed,      :default => false
      t.timestamps
    end

    add_index :comments, ["user_id"]
    add_index :comments, ["commentable_id", "commentable_type"]
    
  end

  def self.down
    drop_table :comments
  end
end

Version data entries

243 entries across 225 versions & 12 rubygems

Version Path
muck-activities-3.2.2 test/db/migrate/20090613173314_create_comments.rb
muck-activities-3.2.1 test/db/migrate/20090613173314_create_comments.rb
muck-services-3.3.3 test/db/migrate/20090613173314_create_comments.rb
muck-commerce-3.0.1 test/db/migrate/20090613173314_create_comments.rb
muck-profiles-3.1.4 test/db/migrate/20090613173314_create_comments.rb
muck-auth-3.5.4 test/db/migrate/20090613173314_create_comments.rb
muck-auth-3.5.3 test/db/migrate/20090613173314_create_comments.rb
muck-profiles-3.1.3 test/db/migrate/20090613173314_create_comments.rb
muck-auth-3.5.2 test/db/migrate/20090613173314_create_comments.rb
muck-invites-3.4.1 test/db/migrate/20090613173314_create_comments.rb
muck-comments-3.2.0 db/migrate/20090613173314_create_comments.rb
muck-comments-3.1.0 db/migrate/20090613173314_create_comments.rb
muck-contents-3.0.2 test/rails_test/db/migrate/20090613173314_create_comments.rb
muck-profiles-3.0.2 test/rails_test/db/migrate/20090613173314_create_comments.rb
muck-services-0.1.47 test/rails_root/db/migrate/20090613173314_create_comments.rb
muck-groups-3.0.0 test/rails_test/db/migrate/20090613173314_create_comments.rb
muck-shares-3.0.1 test/rails_test/db/migrate/20090613173314_create_comments.rb
muck-services-3.0.0 test/rails_test/db/migrate/20090613173314_create_comments.rb
muck-profiles-3.0.1 test/rails_test/db/migrate/20090613173314_create_comments.rb
muck-contents-3.0.1 test/rails_test/db/migrate/20090613173314_create_comments.rb