ci(db): bump migrate-down to 4 + verify verification_decisions (DEV-618)
All checks were successful
build-images / signing-service image (push) Successful in 25s
validate / JSON Schema (ajv) (push) Successful in 24s
phase1-smoke / Phase 1 end-to-end smoke (push) Successful in 1m0s
validate / Rego (opa fmt + opa test) (push) Successful in 14s
validate / DB (migrate up/down dry-run) (push) Successful in 26s
validate / Go (vet + test) (push) Successful in 1m15s
All checks were successful
build-images / signing-service image (push) Successful in 25s
validate / JSON Schema (ajv) (push) Successful in 24s
phase1-smoke / Phase 1 end-to-end smoke (push) Successful in 1m0s
validate / Rego (opa fmt + opa test) (push) Successful in 14s
validate / DB (migrate up/down dry-run) (push) Successful in 26s
validate / Go (vet + test) (push) Successful in 1m15s
0005_verification_decisions landed in DEV-612 but validate.yml still assumed four migrations: it ran migrate down 3 (leaving verification_decisions in place) and never grep'd for it on the up-pass. Bump the roll-back to 4 and add the table to both the up-verify and down-absent lists so the DB job matches reality again. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
parent
55834438a8
commit
5bbd3b2c68
1 changed files with 7 additions and 6 deletions
|
|
@ -237,20 +237,21 @@ jobs:
|
||||||
grep -q ' agents ' /tmp/dt-after-up.txt
|
grep -q ' agents ' /tmp/dt-after-up.txt
|
||||||
grep -q ' agent_keys ' /tmp/dt-after-up.txt
|
grep -q ' agent_keys ' /tmp/dt-after-up.txt
|
||||||
grep -q ' approval_sessions ' /tmp/dt-after-up.txt
|
grep -q ' approval_sessions ' /tmp/dt-after-up.txt
|
||||||
|
grep -q ' verification_decisions ' /tmp/dt-after-up.txt
|
||||||
|
|
||||||
# Roll back everything on top of per_diem_rates (0001) — currently
|
# Roll back everything on top of per_diem_rates (0001) — currently
|
||||||
# 0004_approval_sessions, 0003_agent_keys, 0002_agents — and verify
|
# 0005_verification_decisions, 0004_approval_sessions, 0003_agent_keys,
|
||||||
# per_diem_rates remains while the agent-side tables are gone. Keep
|
# 0002_agents — and verify per_diem_rates remains while the agent-side
|
||||||
# this count equal to the number of migrations above 0001; bump when
|
# tables are gone. Keep this count equal to the number of migrations
|
||||||
# a new migration is added.
|
# above 0001; bump when a new migration is added.
|
||||||
- name: migrate down (all above per_diem_rates) + verify
|
- name: migrate down (all above per_diem_rates) + verify
|
||||||
working-directory: ${{ github.workspace }}
|
working-directory: ${{ github.workspace }}
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
migrate -path db/trust/migrations -database "${DB_URL}" down 3
|
migrate -path db/trust/migrations -database "${DB_URL}" down 4
|
||||||
psql "${DB_URL}" -c '\dt' | tee /tmp/dt-after-down.txt
|
psql "${DB_URL}" -c '\dt' | tee /tmp/dt-after-down.txt
|
||||||
grep -q ' per_diem_rates ' /tmp/dt-after-down.txt
|
grep -q ' per_diem_rates ' /tmp/dt-after-down.txt
|
||||||
for table in agents agent_keys approval_sessions; do
|
for table in agents agent_keys approval_sessions verification_decisions; do
|
||||||
if grep -q " ${table} " /tmp/dt-after-down.txt; then
|
if grep -q " ${table} " /tmp/dt-after-down.txt; then
|
||||||
echo "FAIL: ${table} still present after migrate down" >&2
|
echo "FAIL: ${table} still present after migrate down" >&2
|
||||||
exit 1
|
exit 1
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue