CREATE TABLE IF NOT EXISTS "order_payment_fees" (
  "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL,
  "order_id" uuid NOT NULL,
  "kind" text NOT NULL DEFAULT 'charge',
  "stripe_fee_agorot" integer,
  "provider_payment_id" text,
  "created_at" timestamp with time zone NOT NULL DEFAULT now()
);

CREATE UNIQUE INDEX IF NOT EXISTS "order_payment_fees_order_kind_uq"
  ON "order_payment_fees" ("order_id", "kind");
