Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Delete aggregations column from workflows table #4342

Merged
merged 2 commits into from
Jun 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');


Loading