discourse/db/migrate/20211123144714_add_recent_searches.rb

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

10 lines
257 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class AddRecentSearches < ActiveRecord::Migration[6.1]
def change
add_column :user_options, :oldest_search_log_date, :datetime
add_index :search_logs, [:user_id, :created_at], where: 'user_id IS NOT NULL'
end
end