diff --git a/app/controllers/engagement/case_requests_controller.rb b/app/controllers/engagement/case_requests_controller.rb
new file mode 100644
index 000000000..80947abdc
--- /dev/null
+++ b/app/controllers/engagement/case_requests_controller.rb
@@ -0,0 +1,57 @@
+module Engagement
+ class CaseRequestsController < ApplicationController
+ before_action -> { @back_url = engagement_cases_path }, only: %i[new create]
+
+ def new
+ @case_request = CaseRequest.new
+ @upload_reference = SecureRandom.hex
+ end
+
+ def create
+ @case_request = CaseRequest.new(form_params.except(:upload_reference))
+ @case_request.created_by = current_agent
+
+ if @case_request.valid?
+ @case_request.save!
+ # kase = @case_request.create_case
+
+ # CaseFiles::SubmitCaseUpload.new.call(upload_reference: form_params[:upload_reference], support_case_id: kase.id)
+
+ # create_interaction(kase.id, "create_case", "Case created", @case_request.attributes.slice(:source, :category))
+
+ redirect_to @case_request.eligible_for_school_picker? ? edit_support_case_request_school_picker_path(@case_request) : engagement_case_request_path(@case_request)
+ else
+ render :new
+ end
+ end
+
+ def submit
+ end
+
+ private
+
+ def form_params
+ params.require(:case_request).permit(
+ :organisation_id,
+ :organisation_type,
+ :first_name,
+ :last_name,
+ :email,
+ :phone_number,
+ :extension_number,
+ :discovery_method,
+ :discovery_method_other_text,
+ :category_id,
+ :query_id,
+ :request_text,
+ :other_category,
+ :other_query,
+ :procurement_amount,
+ :upload_reference,
+ ).merge({
+ source: :engagement_and_outreach_cms.to_s,
+ creation_source: :engagement_and_outreach_team.to_s,
+ })
+ end
+ end
+end
diff --git a/app/controllers/support/case_requests_controller.rb b/app/controllers/support/case_requests_controller.rb
new file mode 100644
index 000000000..0d3b10d88
--- /dev/null
+++ b/app/controllers/support/case_requests_controller.rb
@@ -0,0 +1,51 @@
+module Support
+ class CaseRequestsController < ApplicationController
+ before_action -> { @back_url = support_cases_path }, only: %i[new create]
+
+ def new
+ @case_request = CaseRequest.new
+ end
+
+ def create
+ @case_request = CaseRequest.new(form_params.except(:upload_reference))
+ @case_request.created_by = current_agent
+
+ if @case_request.valid?
+ @case_request.save!
+ # kase = @case_request.create_case
+
+ # create_interaction(kase.id, "create_case", "Case created", @case_request.attributes.slice(:source, :category))
+
+ redirect_to support_case_request_path(@case_request)
+ else
+ render :new
+ end
+ end
+
+ def submit
+ end
+
+ private
+
+ def form_params
+ params.require(:case_request).permit(
+ :organisation_id,
+ :organisation_type,
+ :first_name,
+ :last_name,
+ :email,
+ :phone_number,
+ :extension_number,
+ :discovery_method,
+ :discovery_method_other_text,
+ :category_id,
+ :query_id,
+ :source,
+ :request_text,
+ :other_category,
+ :other_query,
+ :procurement_amount,
+ )
+ end
+ end
+end
diff --git a/app/models/case_request.rb b/app/models/case_request.rb
new file mode 100644
index 000000000..72b7b6a93
--- /dev/null
+++ b/app/models/case_request.rb
@@ -0,0 +1,62 @@
+class CaseRequest < ApplicationRecord
+ belongs_to :category, class_name: "Support::Category", optional: true
+ belongs_to :query, class_name: "Support::Query", optional: true
+ belongs_to :organisation, polymorphic: true, optional: true
+ belongs_to :created_by, class_name: "Support::Agent", optional: true
+ belongs_to :support_case, class_name: "Support::Case", optional: true
+
+ enum source: { digital: 0, nw_hub: 1, sw_hub: 2, incoming_email: 3, faf: 4, engagement_and_outreach: 5, schools_commercial_team: 6, engagement_and_outreach_cms: 7 }
+ enum creation_source: { default: 0, engagement_and_outreach_team: 5 }
+
+ validates :first_name, :last_name, :email, :source, presence: true
+ validates :phone_number, length: { maximum: 12 }
+ validates :phone_number, format: /\A(0|\+?44)[12378]\d{8,9}\z/, if: -> { phone_number.present? }
+ validate :discovery_method_validation
+ validates :discovery_method_other_text, presence: true, if: -> { discovery_method == Support::Case.discovery_methods[:other] }
+ validate :request_type_validation
+ validates :procurement_amount, presence: true, numericality: { greater_than: 0.99 }
+ validates :other_category, presence: true, if: -> { category_id == Support::Category.other_category_id }
+ validates :other_query, presence: true, if: -> { query_id == Support::Query.other_query_id }
+
+ def organisation_name
+ return nil unless organisation
+
+ organisation.name
+ end
+
+ def organisation_urn
+ return nil unless organisation
+
+ organisation.urn
+ end
+
+ def request_type
+ return nil unless category.present? || query.present?
+
+ category.present?
+ end
+
+ def eligible_for_school_picker?
+ return false unless organisation.is_a?(Support::EstablishmentGroup)
+
+ organisation.eligible_for_school_picker?
+ end
+
+ def create_case
+ CreateCase.new(attributes).call
+ end
+
+private
+
+ def request_type_validation
+ return if category.present? || query.present?
+
+ errors.add(:request_type, I18n.t("case_requests.validation.request_type"))
+ end
+
+ def discovery_method_validation
+ return if Support::Case.discovery_methods.value?(discovery_method)
+
+ errors.add(:discovery_method, I18n.t("case_requests.validation.discovery_method"))
+ end
+end
diff --git a/app/models/support/case.rb b/app/models/support/case.rb
index 3c0db6164..e66eccc87 100644
--- a/app/models/support/case.rb
+++ b/app/models/support/case.rb
@@ -52,6 +52,7 @@ class Case < ApplicationRecord
belongs_to :procurement_stage, class_name: "Support::ProcurementStage", optional: true
has_one :framework_request, class_name: "FrameworkRequest", foreign_key: :support_case_id
+ has_one :case_request, class_name: "CaseRequest", foreign_key: :support_case_id
accepts_nested_attributes_for :hub_transition, allow_destroy: true, reject_if: :all_blank
@@ -147,5 +148,9 @@ def generate_ref
def support_request
interactions&.support_request&.first
end
+
+ def request
+ framework_request || case_request
+ end
end
end
diff --git a/app/models/support/establishment_group.rb b/app/models/support/establishment_group.rb
index cee0f320f..a373ebddf 100644
--- a/app/models/support/establishment_group.rb
+++ b/app/models/support/establishment_group.rb
@@ -18,4 +18,8 @@ def organisations
end
def mat_or_trust? = establishment_group_type.mat? || establishment_group_type.trust?
+
+ def eligible_for_school_picker?
+ (mat_or_trust? || federation?) && organisations.count > 1
+ end
end
diff --git a/app/views/components/_new_case_request_components.html.erb b/app/views/components/_new_case_request_components.html.erb
new file mode 100644
index 000000000..1eb51d761
--- /dev/null
+++ b/app/views/components/_new_case_request_components.html.erb
@@ -0,0 +1,50 @@
+
+ <%= I18n.t("support.case.label.create") %>
+
+<%= render "components/autocomplete",
+ container_id: "case-request-school-urn-field",
+ label_text: I18n.t("support.case_hub_migration.label.school_name"),
+ label_class: "govuk-hint",
+ element_id: "school-urn-autocomplete",
+ element_name: "case_request[organisation_name]",
+ template_suggestion: "{{name}}, {{postcode}}
{{establishment_type}}
URN: {{urn}} - UKPRN: {{ukprn}}",
+ value_field: :name,
+ default_value: form.object.organisation_name,
+ hidden_fields: {
+ 'case_request[organisation_id]' => [:id, form.object.organisation_id],
+ 'case_request[organisation_type]' => [:source, form.object.organisation_type],
+ 'case_request[organisation_urn]' => [:urn, form.object.organisation_urn],
+ },
+ query_url: support_establishments_path(format: :json, q: "{{QUERY}}") %>
+
+
+
+<%= form.govuk_text_field :first_name,
+ label: { text: I18n.t("support.case_hub_migration.label.first_name") }
+%>
+
+<%= form.govuk_text_field :last_name,
+ label: { text: I18n.t("support.case_hub_migration.label.last_name") }
+%>
+
+<%= form.govuk_email_field :email,
+ label: { text: I18n.t("support.case_hub_migration.label.email") }
+%>
+
+<%= form.govuk_phone_field :phone_number,
+ label: { text: I18n.t("support.case_hub_migration.label.phone_number", optional: I18n.t("support.generic.form.optional")) }
+%>
+
+<%= form.govuk_phone_field :extension_number,
+ label: { text: I18n.t("support.case_hub_migration.label.extension_number", optional: I18n.t("support.generic.form.optional")) }
+%>
+
+<%= render "support/cases/discovery_method/discovery_method", form: form %>
+
+<%= render "support/cases/request_details/form_fields", form: form, show_request_text: false %>
+
+<%= form.govuk_text_field :procurement_amount, width: 5,
+ label: { text: I18n.t("support.case.label.procurement_value"), size: "m" },
+ prefix_text: "£" %>
+
+
diff --git a/app/views/engagement/case_requests/new.html.erb b/app/views/engagement/case_requests/new.html.erb
new file mode 100644
index 000000000..b86a4cfb7
--- /dev/null
+++ b/app/views/engagement/case_requests/new.html.erb
@@ -0,0 +1,72 @@
+
+
+ <%= form_with model: @case_request, scope: :case_request, url: engagement_case_requests_path, html: {
+ "data-controller" => "case-attachment",
+ "data-action" => "submit->case-attachment#onFormSubmitted",
+ "data-case-attachment-target" => "form",
+ "data-case-attachment-dropzone-outlet" => ".drop-zone-container",
+ "data-case-attachment-error-summary-outlet" => ".govuk-error-summary",
+ "data-case-attachment-reference-value" => @upload_reference
+ } do |form| %>
+ <%= form.govuk_error_summary %>
+
+ <%= render "components/new_case_request_components", form: %>
+
+
+ <%= I18n.t("support.case.label.files") %>
+
+
+
+
+
+
Drag and drop files here or
+
+
+ Choose files
+
+
+
+
+
+
+ Files added
+
+
+
+
+
+ Files already uploaded
+
+
+
+
+
+
+ <%= form.hidden_field :upload_reference, :value => @upload_reference %>
+ <%= form.submit I18n.t("support.case_hub_migration.submit"), class: "govuk-button", role: "button", "data-prevent-double-click" => true, "data-case-attachment-target" => "btnSubmit" %>
+
+ <% end %>
+
+
diff --git a/app/views/engagement/cases/index.html.erb b/app/views/engagement/cases/index.html.erb
index 46b399b92..0bd38794e 100644
--- a/app/views/engagement/cases/index.html.erb
+++ b/app/views/engagement/cases/index.html.erb
@@ -1,4 +1,4 @@
-<%= link_to I18n.t("support.case.label.create"), new_engagement_case_path, class: "govuk-button", role: "button" %>
+<%= link_to I18n.t("support.case.label.create"), new_engagement_case_request_path, class: "govuk-button", role: "button" %>
diff --git a/app/views/support/case_requests/new.html.erb b/app/views/support/case_requests/new.html.erb
new file mode 100644
index 000000000..569f71afe
--- /dev/null
+++ b/app/views/support/case_requests/new.html.erb
@@ -0,0 +1,22 @@
+
+
+ <%= form_with model: @case_request, scope: :case_request, url: support_case_requests_path do |form| %>
+ <%= form.govuk_error_summary %>
+
+ <%= render "components/new_case_request_components", form: %>
+
+
+ <%= I18n.t("support.case_source.header") %>
+
+ <%= form.govuk_select(:source,
+ [
+ ["Please select", ""],
+ [I18n.t("support.case.label.source.engagement_and_outreach"), "engagement_and_outreach"],
+ [I18n.t("support.case.label.source.schools_commercial_team"), "schools_commercial_team"]
+ ],
+ label: { text: I18n.t("support.case_source.select.header") })
+ %>
+ <%= form.submit I18n.t("support.case_hub_migration.submit"), class: "govuk-button", role: "button" %>
+ <% end %>
+
+
diff --git a/app/views/support/case_requests/show.html.erb b/app/views/support/case_requests/show.html.erb
new file mode 100644
index 000000000..da600b40b
--- /dev/null
+++ b/app/views/support/case_requests/show.html.erb
@@ -0,0 +1,242 @@
+
+
+ <%= form_with url: support_cases_path, scope: :create_case_form, method: :post, class: "new-case-form" do |form| %>
+
+ <%= I18n.t("support.case_hub_migration.edit.header") %>
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.section.establishment") %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.school_name") %>
+
+ -
+ <%= @form.organisation_name %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.school_postcode") %>
+
+ -
+ <%= @form.organisation_postcode %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.school_urn") %>
+
+ -
+ <%= @form.organisation_urn %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.school_ukprn") %>
+
+ -
+ <%= @form.organisation_ukprn %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.section.contact") %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.name") %>
+
+ -
+ <%= @form.full_name %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.email") %>
+
+ -
+ <%= @form.email %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.phone_number", optional: nil) %>
+
+ -
+ <%= @form.phone_number %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.extension_number", optional: nil) %>
+
+ -
+ <%= @form.extension_number %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
+ <%= I18n.t("support.case.label.discovery_method.legend") %>
+
+
+
+
+
-
+ <%= I18n.t("support.case.label.discovery_method.field") %>
+
+ -
+ <%= I18n.t("support.case.label.discovery_method.#{Support::Case::discovery_methods.keys[@form.discovery_method]}") %>
+ <%= if @form.discovery_method == Support::Case::discovery_methods[:other] && !@form.discovery_method_other_text.empty? then "- #{@form.discovery_method_other_text}" end %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.section.source") %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.case_source") %>
+
+ -
+ <%= I18n.t("support.case.label.source.#{@form.source}") %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.section.case") %>
+
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.type") %>
+
+ -
+ <%= @form.type %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+ <% if @form.type == "Procurement" %>
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.sub_category") %>
+
+ -
+ <%= @form.category_name %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+ <% else %>
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.query") %>
+
+ -
+ <%= @form.query_name %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+ <% end %>
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.section.request_text") %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.request_text") %>
+
+ -
+ <%= simple_format(@form.request_text, class: "govuk-body") %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.section.case_details") %>
+
+
+
+
+
-
+ <%= I18n.t("support.case_hub_migration.label.procurement_value") %>
+
+ -
+ <%= @form.procurement_amount %>
+
+ -
+ <%= form.button I18n.t("generic.button.change_answer"), class: "govuk-link", value: "change" %>
+
+
+
+
+
+ <%= I18n.t("support.case_hub_migration.edit.label.confirm") %>
+
+
+ <%= form.button I18n.t("support.case_hub_migration.edit.submit"), class: "govuk-button", value: "create" %>
+ <% end %>
+
+
diff --git a/app/views/support/cases/index.html.erb b/app/views/support/cases/index.html.erb
index 7b34bee8d..14bf229b1 100644
--- a/app/views/support/cases/index.html.erb
+++ b/app/views/support/cases/index.html.erb
@@ -1,4 +1,4 @@
-<%= link_to I18n.t("support.case.label.create"), new_support_case_path, class: "govuk-button", role: "button" %>
+<%= link_to I18n.t("support.case.label.create"), new_support_case_request_path, class: "govuk-button", role: "button" %>
diff --git a/config/locales/en.yml b/config/locales/en.yml
index d8b608368..bdc313a0c 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -87,6 +87,10 @@ en:
secondary: Secondary
all_through: All-through
sixteen_plus: 16-plus
+ case_requests:
+ validation:
+ request_type: Select whether the request is related to a procurement category
+ discovery_method: Case origin is missing
cookies:
banner:
accepted:
diff --git a/config/locales/validation/en.yml b/config/locales/validation/en.yml
index f4bb3474b..4bdcf9e84 100644
--- a/config/locales/validation/en.yml
+++ b/config/locales/validation/en.yml
@@ -99,6 +99,35 @@ en:
origin_other:
blank: Specify where you heard about the service
+ activerecord:
+ errors:
+ models:
+ case_request:
+ attributes:
+ first_name:
+ blank: Enter the first name of the contact
+ last_name:
+ blank: Enter the last name of the contact
+ email:
+ blank: Enter an email in the correct format. For example, 'someone@school.sch.uk'
+ phone_number:
+ too_long: Phone number cannot have more than 12 digits
+ invalid: Phone number must have no spaces and begin with a 0 or +44, with a minimum of 10 and maximum 12 digits
+ discovery_method:
+ blank: Case origin is missing
+ discovery_method_other_text:
+ blank: Explain how you heard about this service
+ source:
+ blank: Select the source of the case
+ procurement_amount:
+ blank: Enter how much the school will be spending. The number must be greater than 0.
+ greater_than: The number must be greater than 0
+ not_a_number: Enter a valid number
+ other_category:
+ blank: Enter the procurement category
+ other_query:
+ blank: Enter the type of query
+
request:
rules:
procurement_amount: "" # Omitted
diff --git a/config/routes.rb b/config/routes.rb
index 6c8dc764b..ddd57ec0e 100644
--- a/config/routes.rb
+++ b/config/routes.rb
@@ -212,6 +212,14 @@
resources :establishment_groups, only: %i[index]
resources :frameworks, only: %i[index]
resources :towers, only: [:show]
+ resources :case_requests, only: %i[new create edit update show] do
+ scope module: "case_requests" do
+ member do
+ post "/submit", to: "case_requests#submit"
+ resource :school_picker, only: %i[edit update], as: :case_request_school_picker
+ end
+ end
+ end
resources :cases, only: %i[index show edit update new create] do
resources :interactions, only: %i[new create show]
scope module: :cases do
@@ -309,6 +317,7 @@
# E&O Portal
namespace :engagement do
root to: "cases#index"
+ resources :case_requests, only: %i[new create edit update show]
resources :cases, only: %i[index show edit update new create] do
scope module: :cases do
collection do
diff --git a/db/migrate/20230928103125_create_case_requests.rb b/db/migrate/20230928103125_create_case_requests.rb
new file mode 100644
index 000000000..44d47f8c2
--- /dev/null
+++ b/db/migrate/20230928103125_create_case_requests.rb
@@ -0,0 +1,28 @@
+class CreateCaseRequests < ActiveRecord::Migration[7.0]
+ def change
+ create_table :case_requests, id: :uuid do |t|
+ t.string :first_name
+ t.string :last_name
+ t.string :email
+ t.string :phone_number
+ t.string :extension_number
+ t.text :request_text
+ t.boolean :submitted, default: false
+ t.references :created_by, foreign_key: { to_table: :support_agents }, type: :uuid
+ t.uuid :organisation_id
+ t.string :organisation_type
+ t.references :category, foreign_key: { to_table: :support_categories }, type: :uuid
+ t.references :query, foreign_key: { to_table: :support_queries }, type: :uuid
+ t.column :other_category, :string
+ t.column :other_query, :string
+ t.decimal :procurement_amount, precision: 9, scale: 2
+ t.string :school_urns, array: true, default: []
+ t.integer :discovery_method
+ t.string :discovery_method_other_text
+ t.integer :source
+ t.integer :creation_source
+ t.references :support_case, foreign_key: { to_table: :support_cases }, type: :uuid
+ t.timestamps
+ end
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0258e0a5e..8feaa2565 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -91,6 +91,36 @@
t.index ["case_id"], name: "index_all_cases_survey_responses_on_case_id"
end
+ create_table "case_requests", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
+ t.string "first_name"
+ t.string "last_name"
+ t.string "email"
+ t.string "phone_number"
+ t.string "extension_number"
+ t.text "request_text"
+ t.boolean "submitted", default: false
+ t.uuid "created_by_id"
+ t.uuid "organisation_id"
+ t.string "organisation_type"
+ t.uuid "category_id"
+ t.uuid "query_id"
+ t.string "other_category"
+ t.string "other_query"
+ t.decimal "procurement_amount", precision: 9, scale: 2
+ t.string "school_urns", default: [], array: true
+ t.integer "discovery_method"
+ t.string "discovery_method_other_text"
+ t.integer "source"
+ t.integer "creation_source"
+ t.uuid "support_case_id"
+ t.datetime "created_at", null: false
+ t.datetime "updated_at", null: false
+ t.index ["category_id"], name: "index_case_requests_on_category_id"
+ t.index ["created_by_id"], name: "index_case_requests_on_created_by_id"
+ t.index ["query_id"], name: "index_case_requests_on_query_id"
+ t.index ["support_case_id"], name: "index_case_requests_on_support_case_id"
+ end
+
create_table "categories", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
t.string "title", null: false
t.string "description", null: false
@@ -910,6 +940,10 @@
add_foreign_key "all_cases_survey_responses", "support_cases", column: "case_id"
add_foreign_key "documents", "framework_requests"
add_foreign_key "documents", "support_cases"
+ add_foreign_key "case_requests", "support_agents", column: "created_by_id"
+ add_foreign_key "case_requests", "support_cases"
+ add_foreign_key "case_requests", "support_categories", column: "category_id"
+ add_foreign_key "case_requests", "support_queries", column: "query_id"
add_foreign_key "exit_survey_responses", "support_cases", column: "case_id"
add_foreign_key "framework_requests", "request_for_help_categories", column: "category_id"
add_foreign_key "framework_requests", "support_cases"