diff --git a/app/views/workflows/show.html.erb b/app/views/workflows/show.html.erb
index fc8914258..331743f8f 100644
--- a/app/views/workflows/show.html.erb
+++ b/app/views/workflows/show.html.erb
@@ -8,9 +8,9 @@
diff --git a/db/migrate/20190228155041_add_extractors_count_to_workflows.rb b/db/migrate/20190228155041_add_extractors_count_to_workflows.rb
new file mode 100644
index 000000000..8485d6006
--- /dev/null
+++ b/db/migrate/20190228155041_add_extractors_count_to_workflows.rb
@@ -0,0 +1,5 @@
+class AddExtractorsCountToWorkflows < ActiveRecord::Migration[5.2]
+ def change
+ add_column :workflows, :extractors_count, :int
+ end
+end
diff --git a/db/migrate/20190228155344_add_reducers_count_to_workflows.rb b/db/migrate/20190228155344_add_reducers_count_to_workflows.rb
new file mode 100644
index 000000000..8d63a84dd
--- /dev/null
+++ b/db/migrate/20190228155344_add_reducers_count_to_workflows.rb
@@ -0,0 +1,5 @@
+class AddReducersCountToWorkflows < ActiveRecord::Migration[5.2]
+ def change
+ add_column :workflows, :reducers_count, :int
+ end
+end
diff --git a/db/migrate/20190228155359_add_subject_rules_count_to_workflows.rb b/db/migrate/20190228155359_add_subject_rules_count_to_workflows.rb
new file mode 100644
index 000000000..2a7cf1186
--- /dev/null
+++ b/db/migrate/20190228155359_add_subject_rules_count_to_workflows.rb
@@ -0,0 +1,5 @@
+class AddSubjectRulesCountToWorkflows < ActiveRecord::Migration[5.2]
+ def change
+ add_column :workflows, :subject_rules_count, :int
+ end
+end
diff --git a/db/migrate/20190228155430_add_user_rules_count_to_workflows.rb b/db/migrate/20190228155430_add_user_rules_count_to_workflows.rb
new file mode 100644
index 000000000..a10dc7881
--- /dev/null
+++ b/db/migrate/20190228155430_add_user_rules_count_to_workflows.rb
@@ -0,0 +1,5 @@
+class AddUserRulesCountToWorkflows < ActiveRecord::Migration[5.2]
+ def change
+ add_column :workflows, :user_rules_count, :int
+ end
+end
diff --git a/db/migrate/20190228155456_add_reducers_count_to_projects.rb b/db/migrate/20190228155456_add_reducers_count_to_projects.rb
new file mode 100644
index 000000000..71749c1f6
--- /dev/null
+++ b/db/migrate/20190228155456_add_reducers_count_to_projects.rb
@@ -0,0 +1,5 @@
+class AddReducersCountToProjects < ActiveRecord::Migration[5.2]
+ def change
+ add_column :projects, :reducers_count, :int
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index b49b8c382..136253bce 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 2018_12_17_191627) do
+ActiveRecord::Schema.define(version: 2019_02_28_155456) do
# These are extensions that must be enabled in order to support this database
enable_extension "pgcrypto"
@@ -111,6 +111,7 @@
t.string "display_name"
t.integer "subject_reductions_count"
t.integer "user_reductions_count"
+ t.integer "reducers_count"
end
create_table "reducers", force: :cascade do |t|
@@ -261,6 +262,10 @@
t.integer "user_reductions_count"
t.integer "subject_actions_count"
t.integer "user_actions_count"
+ t.integer "extractors_count"
+ t.integer "reducers_count"
+ t.integer "subject_rules_count"
+ t.integer "user_rules_count"
end
add_foreign_key "classifications", "subjects"
diff --git a/lib/tasks/project_counters.rake b/lib/tasks/project_counters.rake
index 60b5cb603..d0c40a05f 100644
--- a/lib/tasks/project_counters.rake
+++ b/lib/tasks/project_counters.rake
@@ -5,7 +5,7 @@ namespace :counters do
task projects: :environment do
Project.reset_column_information
Project.pluck(:id).each do |id|
- Project.reset_counters id, :subject_reductions, :user_reductions
+ Project.reset_counters id, :subject_reductions, :user_reductions, :reducers
end
end
end
diff --git a/lib/tasks/workflow_counters.rake b/lib/tasks/workflow_counters.rake
index 0a1e3d16c..be7179413 100644
--- a/lib/tasks/workflow_counters.rake
+++ b/lib/tasks/workflow_counters.rake
@@ -4,7 +4,7 @@ namespace :counters do
task workflows: :environment do
Workflow.reset_column_information
Workflow.pluck(:id).each do |id|
- Workflow.reset_counters id, :extracts, :subject_reductions, :user_reductions, :subject_actions, :user_actions
+ Workflow.reset_counters id, :extracts, :subject_reductions, :user_reductions, :subject_actions, :user_actions, :extractors, :reducers, :subject_rules, :user_rules
end
end
end