mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-30 10:58:31 -05:00
12 lines
290 B
Ruby
12 lines
290 B
Ruby
|
class ViewsToTopicViews < ActiveRecord::Migration
|
||
|
def change
|
||
|
remove_column :views, :parent_type
|
||
|
rename_column :views, :parent_id, :topic_id
|
||
|
|
||
|
rename_table :views, :topic_views
|
||
|
|
||
|
add_index :topic_views, [:topic_id]
|
||
|
add_index :topic_views, [:user_id, :topic_id]
|
||
|
end
|
||
|
end
|