Skip to content

Commit 05ca8e6

Browse files
committed
Enable ops tools
This adds a data migration which enables the ops tools in (and adjusts the rake tasks which onboards the ops team to align with recent schema changes).
1 parent d1042b1 commit 05ca8e6

3 files changed

Lines changed: 19 additions & 7 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# frozen_string_literal: true
2+
3+
class AddOpsSupportTeamAndEnableOpsTools < ActiveRecord::Migration[8.1]
4+
def up
5+
Flipper.enable(:ops_tools)
6+
7+
return if Team.exists?(workgroup: CIS2Info::SUPPORT_WORKGROUP)
8+
9+
Rake::Task['ops_support:seed'].execute
10+
end
11+
12+
def down
13+
raise ActiveRecord::IrreversibleMigration
14+
end
15+
end

db/data_schema.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
DataMigrate::Data.define(version: 2026_03_31_200000)
1+
DataMigrate::Data.define(version: 2026_04_21_140000)

lib/tasks/ops_support.rake

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,12 @@ namespace :ops_support do
88

99
Team.find_or_create_by!(
1010
organisation:,
11+
type: :support,
1112
name: "Operational Support Team",
1213
workgroup: CIS2Info::SUPPORT_WORKGROUP,
13-
careplus_venue_code: "XXX",
14-
email: "england.mavis@nhs.net",
15-
phone: "01234 567890",
16-
privacy_notice_url: "https://www.example.com/privacy",
17-
privacy_policy_url: "https://www.example.com/privacy",
1814
days_before_consent_reminders: 0,
19-
days_before_consent_requests: 0
15+
days_before_consent_requests: 0,
16+
programmes: []
2017
)
2118
end
2219
end

0 commit comments

Comments
 (0)