Skip to content

Emergencies and manual runs

Incidents do not wait for approvals. An emergency deploys without the environment's rule, and it is never invisible.

sql2devops emergency ./HOTFIX-77 --project finance --env PROD \
    --reason "orders failing in production" --ticket INC-77
  • A folder is accepted: it is submitted first, so the immutable copy exists.
  • The lock, the history table and the comparison with the database still apply; only the prerequisite and the approvals are skipped.

Rules (optional)

# project.yaml
emergency:
  allowed: [github:oncall]     # default: anyone, and it is still recorded
  require_ticket: true
  reviewers: [github:boss]     # default: anyone but the person who ran it

Manual runs

When someone ran a script by hand, record it so the next deployment knows it is applied:

sql2devops record-manual ./MANUAL-5 --project finance --env HML \
    --reason "adjustment run by the DBA during INC-77" --ticket INC-77

Follow-ups

Emergencies and manual runs leave follow-ups, shown by status until done:

  1. a review by someone else;
  2. the same version deployed through the normal flow to the environments it skipped.
sql2devops review --project finance --package HOTFIX-77 --env PROD --notes "checked the fix"
sql2devops history --project finance --emergencies
PACKAGE     VERSION   DEV   HML   PROD   NEXT
HOTFIX-77   v1        -     -     ok*    DEV (ready)

follow-ups after emergencies and manual runs:
  #2 HOTFIX-77 v1 in PROD (emergency by github:oncall, INC-77): review; deploy to DEV, HML