Skip to content

Commit

Permalink
Delete aggregations column from workflows table (#4342)
Browse files Browse the repository at this point in the history
* Delete aggregations column from workflows table

* the fro-zone
  • Loading branch information
zwolf authored Jun 6, 2024
1 parent db10db4 commit e91de00
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 11 deletions.
2 changes: 0 additions & 2 deletions app/models/workflow.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

class RemoveAggregationFromWorkflows < ActiveRecord::Migration[6.1]
def change
remove_column :workflows, :aggregation, :jsonb
end
end
11 changes: 2 additions & 9 deletions db/structure.sql
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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: -
--
Expand Down Expand Up @@ -4605,6 +4597,7 @@ INSERT INTO "schema_migrations" (version) VALUES
('20231025200957'),
('20240216142515'),
('20240216171653'),
('20240216171937');
('20240216171937'),
('20240531184258');


0 comments on commit e91de00

Please sign in to comment.