Skip to content

Add oncall rotation and participant table

Sean Arnold requested to merge 262857-creation-rotation-table-models into master

What does this MR do?

As part of #262857 (closed), we are adding two models:

  • IncidentManagement::OncallRotation - The oncall rotation itself, which belongs to a IncidentManagement::Schedule
  • IncidentManagement::OncallParticipant - The participants of the oncall rotation.

Database Migrations

UP:

== 20201124030537 CreateIncidentManagementOnCallRotations: migrating ==========
-- table_exists?(:incident_management_oncall_rotations)
   -> 0.0007s
-- create_table(:incident_management_oncall_rotations)
   -> 0.0095s
-- transaction_open?()
   -> 0.0000s
-- current_schema()
   -> 0.0002s
-- execute("ALTER TABLE incident_management_oncall_rotations\nADD CONSTRAINT check_5209fb5d02\nCHECK ( char_length(name) <= 200 )\nNOT VALID;\n")
   -> 0.0004s
-- current_schema()
   -> 0.0002s
-- execute("SET statement_timeout TO 0")
   -> 0.0002s
-- execute("ALTER TABLE incident_management_oncall_rotations VALIDATE CONSTRAINT check_5209fb5d02;")
   -> 0.0005s
-- execute("RESET ALL")
   -> 0.0002s
== 20201124030537 CreateIncidentManagementOnCallRotations: migrated (0.0200s) =

== 20201125233219 AddIncidentManagementOnCallParticipants: migrating ==========
-- table_exists?(:incident_management_oncall_participants)
   -> 0.0006s
-- create_table(:incident_management_oncall_participants)
   -> 0.0224s
== 20201125233219 AddIncidentManagementOnCallParticipants: migrated (0.0290s) =

DOWN:

== 20201125233219 AddIncidentManagementOnCallParticipants: reverting ==========
-- drop_table(:incident_management_oncall_participants)
   -> 0.0130s
== 20201125233219 AddIncidentManagementOnCallParticipants: reverted (0.0131s) =

== 20201124030537 CreateIncidentManagementOnCallRotations: reverting ==========
-- drop_table(:incident_management_oncall_rotations)
   -> 0.0016s
== 20201124030537 CreateIncidentManagementOnCallRotations: reverted (0.0124s) =

Screenshots (strongly suggested)

Does this MR meet the acceptance criteria?

Conformity

Availability and Testing

Security

If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:

  • [-] Label as security and @ mention @gitlab-com/gl-security/appsec
  • [-] The MR includes necessary changes to maintain consistency between UI, API, email, or other methods
  • [-] Security reports checked/validated by a reviewer from the AppSec team

Related to #262857 (closed)

Edited by Mayra Cabrera

Merge request reports