create table if not exists "stripe"."payment_intents" (
  id text primary key,
  object text,
  amount integer,
  amount_capturable integer,
  amount_details jsonb,
  amount_received integer,
  application text,
  application_fee_amount integer,
  automatic_payment_methods text,
  canceled_at integer,
  cancellation_reason text,
  capture_method text,
  client_secret text,
  confirmation_method text,
  created integer,
  currency text,
  customer text,
  description text,
  invoice text,
  last_payment_error text,
  livemode boolean,
  metadata jsonb,
  next_action text,
  on_behalf_of text,
  payment_method text,
  payment_method_options jsonb,
  payment_method_types jsonb,
  processing text,
  receipt_email text,
  review text,
  setup_future_usage text,
  shipping jsonb,
  statement_descriptor text,
  statement_descriptor_suffix text,
  status text,
  transfer_data jsonb,
  transfer_group text
);

CREATE INDEX stripe_payment_intents_customer_idx ON "stripe"."payment_intents" USING btree (customer);
CREATE INDEX stripe_payment_intents_invoice_idx ON "stripe"."payment_intents" USING btree (invoice);