Files
MatchLiveTv/backend/db/migrate/20260820220000_create_analytics_page_snapshots.rb
eminuxandCursor 70fccc493e Usa screenshot di pagina come sfondo heatmap al posto dell’iframe.
Cattura periodica client-side (con consenso), storage ActiveStorage e overlay allineato all’immagine.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-20 23:14:47 +02:00

17 lines
584 B
Ruby

# frozen_string_literal: true
class CreateAnalyticsPageSnapshots < ActiveRecord::Migration[7.2]
def change
create_table :analytics_page_snapshots, id: :uuid, default: -> { "gen_random_uuid()" } do |t|
t.string :page_path, null: false
t.string :device, null: false
t.integer :width, null: false, default: 0
t.integer :height, null: false, default: 0
t.datetime :captured_at, null: false
t.timestamps
end
add_index :analytics_page_snapshots, %i[page_path device], unique: true, name: "index_analytics_page_snapshots_unique"
end
end