Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
f7952faf
Commit
f7952faf
authored
Dec 09, 2021
by
Sean Arnold
Committed by
Douglas Barbosa Alexandre
Jan 05, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add backfill incident escalation status migration
parent
1fc8cb43
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
0 deletions
+21
-0
lib/gitlab/background_migration/backfill_incident_issue_escalation_statuses.rb
..._migration/backfill_incident_issue_escalation_statuses.rb
+21
-0
No files found.
lib/gitlab/background_migration/backfill_incident_issue_escalation_statuses.rb
0 → 100644
View file @
f7952faf
# frozen_string_literal: true
module
Gitlab
module
BackgroundMigration
# BackfillIncidentIssueEscalationStatuses adds
# IncidentManagement::IssuableEscalationStatus records for existing Incident issues.
# They will be added with no policy, and escalations_started_at as nil.
class
BackfillIncidentIssueEscalationStatuses
def
perform
(
start_id
,
stop_id
)
ActiveRecord
::
Base
.
connection
.
execute
<<~
SQL
INSERT INTO incident_management_issuable_escalation_statuses (issue_id, created_at, updated_at)
SELECT issues.id, now(), now()
FROM issues
WHERE issues.issue_type = 1
AND issues.id BETWEEN
#{
start_id
}
AND
#{
stop_id
}
ON CONFLICT (issue_id) DO NOTHING;
SQL
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment