discourse/db/migrate/20240705153533_add_user_agent_to_search_logs.rb
Isaac Janzen 005f623c42
DEV: Add user_agent column to search_logs (#27742)
Add a new column - `user_agent` - to the `SearchLog` table. 

This column can be null as we are only allowing a the user-agent string to have a max length of 2000 characters. In the case the user-agent string surpasses the max characters allowed, we simply nullify the value, and save/write the log as normal.
2024-07-05 14:05:00 -05:00

8 lines
191 B
Ruby

# frozen_string_literal: true
class AddUserAgentToSearchLogs < ActiveRecord::Migration[7.1]
def change
add_column :search_logs, :user_agent, :string, null: true, limit: 2000
end
end