mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Add subtype to topics to classify private messages
This commit is contained in:
10
db/migrate/20130416170855_add_subtype_to_topics.rb
Normal file
10
db/migrate/20130416170855_add_subtype_to_topics.rb
Normal 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
|
||||
Reference in New Issue
Block a user