discourse/db/migrate/20140804072504_views_to_top...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
326 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class ViewsToTopicViews < ActiveRecord::Migration[4.2]
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