no longer decrement post counts when post is deleted

This commit is contained in:
albert
2013-03-18 09:28:31 -07:00
parent 177baa9ec7
commit fff581dc28
3 changed files with 4 additions and 3 deletions

View File

@@ -3,5 +3,5 @@
require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', 'environment'))
ActiveRecord::Base.connection.execute("set statement_timeout = 0")
ActiveRecord::Base.connection.execute("update comments set updater_id = creator_id")
ActiveRecord::Base.connection.execute("update comments set updater_id = creator_id where updater_id is null")
ActiveRecord::Base.connection.execute("update tags set post_count = 0 where post_count < 0")