-- Ricompense accreditate da Bidoo (issue #38, ADR 0015). Solo una tabella nuova. -- Serve allo storico per: ciò che Bidoo ha davvero accreditato, letto dalle sue pagine (forzieri da -- /my_chests.php, movimenti gratuiti da /bids_history.php), da confrontare con i riscatti tentati in -- promo_redemptions: dice quanto rende il riscatto e se un accredito sfugge al saldo. Una riga per -- ricompensa, mai riscritta (key unica: forziere con data, fonte, premio e ordine; movimento con il suo id). CREATE TABLE IF NOT EXISTS account_rewards ( id bigserial PRIMARY KEY, key text NOT NULL UNIQUE, kind text NOT NULL, ts timestamptz NOT NULL, bids int NOT NULL, free boolean NOT NULL, source text NOT NULL, description text NOT NULL, seen_at timestamptz NOT NULL DEFAULT now() ); CREATE INDEX IF NOT EXISTS account_rewards_ts ON account_rewards(ts);