From e91de00199cac9aca796aefceb263a756c3eb9ed Mon Sep 17 00:00:00 2001 From: Zach Wolfenbarger Date: Thu, 6 Jun 2024 11:00:15 -0500 Subject: [PATCH] Delete aggregations column from workflows table (#4342) * Delete aggregations column from workflows table * the fro-zone --- app/models/workflow.rb | 2 -- ...0240531184258_remove_aggregation_from_workflows.rb | 7 +++++++ db/structure.sql | 11 ++--------- 3 files changed, 9 insertions(+), 11 deletions(-) create mode 100644 db/migrate/20240531184258_remove_aggregation_from_workflows.rb diff --git a/app/models/workflow.rb b/app/models/workflow.rb index a02db57b2..64830ceea 100644 --- a/app/models/workflow.rb +++ b/app/models/workflow.rb @@ -8,8 +8,6 @@ class Workflow < ApplicationRecord include Translatable include Versioning - self.ignored_columns = ['aggregation'] - versioned association: :workflow_versions, attributes: %w(tasks first_task strings major_version minor_version) belongs_to :project diff --git a/db/migrate/20240531184258_remove_aggregation_from_workflows.rb b/db/migrate/20240531184258_remove_aggregation_from_workflows.rb new file mode 100644 index 000000000..105fbeefe --- /dev/null +++ b/db/migrate/20240531184258_remove_aggregation_from_workflows.rb @@ -0,0 +1,7 @@ +# frozen_string_literal: true + +class RemoveAggregationFromWorkflows < ActiveRecord::Migration[6.1] + def change + remove_column :workflows, :aggregation, :jsonb + end +end diff --git a/db/structure.sql b/db/structure.sql index dcf97baca..6140bdc73 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1954,7 +1954,6 @@ CREATE TABLE public.workflows ( retired_set_member_subjects_count integer DEFAULT 0, retirement jsonb DEFAULT '{}'::jsonb, active boolean DEFAULT true, - aggregation jsonb DEFAULT '{}'::jsonb NOT NULL, display_order integer, configuration jsonb DEFAULT '{}'::jsonb NOT NULL, public_gold_standard boolean DEFAULT false, @@ -3712,13 +3711,6 @@ CREATE UNIQUE INDEX index_workflow_versions_on_workflow_and_major_and_minor ON p CREATE INDEX index_workflows_on_activated_state ON public.workflows USING btree (activated_state); --- --- Name: index_workflows_on_aggregation; Type: INDEX; Schema: public; Owner: - --- - -CREATE INDEX index_workflows_on_aggregation ON public.workflows USING btree (((aggregation ->> 'public'::text))); - - -- -- Name: index_workflows_on_display_order; Type: INDEX; Schema: public; Owner: - -- @@ -4605,6 +4597,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20231025200957'), ('20240216142515'), ('20240216171653'), -('20240216171937'); +('20240216171937'), +('20240531184258');