-- ======================
-- FORMS: Form
-- ======================
CREATE TABLE unified_forms_form (
  unified_connection_id  text NOT NULL,
  unified_webhook_id     text NOT NULL,
  unified_external_xref  text,
  unified_integration_type text NOT NULL,
  unified_raw_id         text,
  unified_id             text NOT NULL,
  id                   text,
  created_at           timestamptz,
  updated_at           timestamptz,
  name                 text,
  description          text,
  fields               jsonb,
  is_active            boolean,
  published_url        text,
  response_count       numeric,
  has_multiple_submissions boolean,
  has_progress_bar     boolean,
  has_shuffle_questions boolean,
  confirmation_message text,
  confirmation_redirect_url text,
  raw                  jsonb
);
-- ======================
-- FORMS: Submission
-- ======================
CREATE TABLE unified_forms_submission (
  unified_connection_id  text NOT NULL,
  unified_webhook_id     text NOT NULL,
  unified_external_xref  text,
  unified_integration_type text NOT NULL,
  unified_raw_id         text,
  unified_id             text NOT NULL,
  id                   text,
  created_at           timestamptz,
  updated_at           timestamptz,
  form_id              text,
  respondent_email     text,
  respondent_name      text,
  answers              jsonb,
  raw                  jsonb
);
