Sha256: af598f5cd0ef68328d096c99b6513518e1909c41cd7ca8ab334640166c6cb26a

Contents?: true

Size: 835 Bytes

Versions: 10

Compression:

Stored size: 835 Bytes

Contents

# This migration comes from the_comments_engine (originally 20130101010101)
# null: false => de-facto db-level validation
class ChangeUser < ActiveRecord::Migration
  def change
    change_table :users do |t|
      # "Written by me" (cache counters)
      t.integer :my_draft_comments_count,      default: 0
      t.integer :my_published_comments_count,  default: 0
      t.integer :my_comments_count,            default: 0 # my_draft_comments_count + my_published_comments_count

      # commentable's comments => comcoms (cache counters)
      # Relation through Comment#holder_id field
      t.integer :draft_comcoms_count,     default: 0
      t.integer :published_comcoms_count, default: 0
      t.integer :deleted_comcoms_count,   default: 0
      t.integer :spam_comcoms_count,      default: 0
    end
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
fuck_comments-2.3.4 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments_ruby-2.3.4 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments_ruby-2.3.3 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.3.1 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.2.2 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.2.1 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.2.0 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.1.0 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.0.1 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb
the_comments-2.0.0 spec/dummy_app/db/migrate/20131027185332_change_user.the_comments_engine.rb