Add subtype to topics to classify private messages

This commit is contained in:
Neil Lalonde
2013-04-16 16:56:18 -04:00
parent 2b5a2b5fce
commit 3b6aeb14c7
16 changed files with 223 additions and 43 deletions

View File

@@ -0,0 +1,10 @@
class AddSubtypeToTopics < ActiveRecord::Migration
def up
add_column :topics, :subtype, :string
execute "update topics set subtype = 'user_to_user' where archetype = 'private_message'"
end
def down
remove_column :topics, :subtype
end
end