ALTER TABLE bookings ADD COLUMN payment_status TEXT NOT NULL DEFAULT 'not_requested';
ALTER TABLE bookings ADD COLUMN payment_amount INTEGER;
ALTER TABLE bookings ADD COLUMN payment_currency TEXT;
ALTER TABLE bookings ADD COLUMN stripe_checkout_session_id TEXT;
ALTER TABLE bookings ADD COLUMN stripe_payment_intent_id TEXT;
ALTER TABLE bookings ADD COLUMN paid_at TEXT;

CREATE INDEX IF NOT EXISTS idx_bookings_payment_status ON bookings(payment_status);
CREATE UNIQUE INDEX IF NOT EXISTS idx_bookings_stripe_checkout_session_id
  ON bookings(stripe_checkout_session_id)
  WHERE stripe_checkout_session_id IS NOT NULL;
