2017-08-31 00:06:56 -04:00
|
|
|
class AddClearedPinnedToTopicUsers < ActiveRecord::Migration[4.2]
|
2013-03-06 15:17:07 -05:00
|
|
|
def change
|
|
|
|
add_column :topic_users, :cleared_pinned_at, :datetime, null: true
|
|
|
|
|
|
|
|
add_column :topics, :pinned_at, :datetime, null: true
|
|
|
|
execute "UPDATE topics SET pinned_at = created_at WHERE pinned"
|
|
|
|
remove_column :topics, :pinned
|
|
|
|
end
|
|
|
|
end
|