-- Migrate from Lemonsqueezy to Mollie
-- Renames payment provider columns in registration and drinkkaart_topup tables.

-- registration table:
--   lemonsqueezy_order_id    -> mollie_payment_id
--   lemonsqueezy_customer_id -> dropped (Mollie does not return a persistent
--                               customer ID for one-off payments)

ALTER TABLE registration RENAME COLUMN lemonsqueezy_order_id TO mollie_payment_id;
ALTER TABLE registration DROP COLUMN lemonsqueezy_customer_id;

-- drinkkaart_topup table:
--   lemonsqueezy_order_id    -> mollie_payment_id
--   lemonsqueezy_customer_id -> dropped

ALTER TABLE drinkkaart_topup RENAME COLUMN lemonsqueezy_order_id TO mollie_payment_id;
ALTER TABLE drinkkaart_topup DROP COLUMN lemonsqueezy_customer_id;
