Sha256: 44a5e3f9d665763e2fe74bd81d3940fd497cc2a81ff2fa08c173bf420a8c33bb
Contents?: true
Size: 363 Bytes
Versions: 40
Compression:
Stored size: 363 Bytes
Contents
class <%= migration_class_name %> < ActiveRecord::Migration def self.up <% counter_cache_columns.each do |column| %> add_column :<%= table_name %>, :<%= column %>, :integer, :null => false, :default => 0 <% end %> end def self.down <% counter_cache_columns.each do |column| %> remove_column :<%= table_name %>, :<%= column %> <% end %> end end
Version data entries
40 entries across 40 versions & 1 rubygems