ALTER TABLE recurly_transaction_web_hooks ADD COLUMN admin_description VARCHAR;
ALTER TABLE recurly_transaction_web_hooks ADD COLUMN jam_track_id VARCHAR(64) REFERENCES jam_tracks(id);

CREATE VIEW payment_histories AS
    SELECT  id AS sale_id,
            CAST(NULL as VARCHAR) AS recurly_transaction_web_hook_id,
            user_id,
            created_at,
            'sale' AS transaction_type
    FROM sales s
    UNION ALL
    SELECT  CAST(NULL as VARCHAR) AS sale_id,
            id AS recurly_transaction_web_hook_id,
            user_id,
            transaction_at AS created_at,
            transaction_type
    FROM recurly_transaction_web_hooks;