0
0
Fork 0
mirror of https://github.com/discourse/discourse.git synced 2026-08-06 13:08:40 +08:00
discourse/db/migrate/20260615082047_add_source_to_browser_pageview_events.rb
Krzysztof Kotlarek ae83498179
DEV: Track beacon browser pageviews behind dashboard_improvements (#40934)
Previously, browser pageviews were persisted through the MessageBus
piggyback path, which could miss navigation and unload events.

This change records piggyback and sendBeacon pageviews in
browser_pageview_events with a source, and uses the beacon transport for
dashboard_improvements because keepalive requests can complete after
page navigation starts.

---------

Co-authored-by: Natalie Tay <natalie.tay@gmail.com>
2026-06-23 10:21:39 +08:00

7 lines
218 B
Ruby
Vendored

# frozen_string_literal: true
class AddSourceToBrowserPageviewEvents < ActiveRecord::Migration[8.0]
def change
add_column :browser_pageview_events, :source, :integer, limit: 2, default: 1, null: false
end
end