Sha256: 62ed5effcfe0e5ceee576da502716a768618f73fd5591e2780dd586b8c5b654e

Contents?: true

Size: 1.37 KB

Versions: 5

Compression:

Stored size: 1.37 KB

Contents

class CreateComments < ActiveRecord::Migration
  def up
    create_table "comment_subscribers" do |t|
      t.integer  "commentable_id"
      t.string   "commentable_type"
      t.string   "email"
      t.datetime "created_at"
      t.datetime "updated_at"
    end

    add_index "comment_subscribers", ["commentable_id"], :name => "index_comment_subscribers_on_commentable_id"
    add_index "comment_subscribers", ["commentable_type"], :name => "index_comment_subscribers_on_commentable_type"

    create_table "comments" do |t|
      t.string   "author"
      t.string   "author_url"
      t.string   "author_email"
      t.text     "content"
      t.string   "permalink"
      t.string   "user_ip"
      t.string   "user_agent"
      t.string   "referrer"
      t.integer  "commentable_id"
      t.boolean  "approved",         :default => false, :null => false
      t.datetime "created_at"
      t.datetime "updated_at"
      t.string   "commentable_type"
    end

    add_index "comments", ["commentable_id"], :name => "index_comments_on_commentable_id"
    add_index "comments", ["commentable_id"], :name => "index_comments_on_post_id"
    add_index "comments", ["commentable_type"], :name => "index_comments_on_commentable_type"
    add_index "comments", ["created_at"], :name => "index_comments_on_created_at"
  end

  def down
    drop_table :comment_subscribers
    drop_table :comments
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
forge-cli-0.0.10 lib/forge/db/migrate/20130404141259_create_comments.rb
forge-cli-0.0.9 lib/forge/db/migrate/20130404141259_create_comments.rb
forge-cli-0.0.8 lib/forge/db/migrate/20130404141259_create_comments.rb
forge-cli-0.0.7 lib/forge/db/migrate/20130404141259_create_comments.rb
forge-cli-0.0.6 lib/forge/db/migrate/20130404141259_create_comments.rb