Skip to content

docs: a dated schema file is applied by rapidctl db apply, as postgres - #684

Merged
rusholme merged 1 commit into
mainfrom
db-login-cleanup/1-apply-command
Dec 4, 2026
Merged

rusholme merged 1 commit into
mainfrom
db-login-cleanup/1-apply-command

Conversation

@rusholme

@rusholme rusholme commented Dec 4, 2026

Copy link
Copy Markdown
Collaborator

database/README.md names the command that applies a dated schema file. The one it named, rapid_systems' cloudformation/apply-dated-sql.sh, was deleted by that repository's refactor; IPAC-SW/rapid_systems PR 593 restores it as rapidctl db apply ENV FILE, which pipes the file to psql -X -v ON_ERROR_STOP=1 as postgres on the database host and exits 0 only when psql ran the whole file. The paragraph also says that postgres owns the schema and its default privileges give the grants (Ben, 2026-12-04: postgres stays the owner). Card db-login-cleanup, task 1, first attempt.

Files: database/README.md.

Measurements

Proof Result
rapidctl db apply rapid 2026-11-17-survey-programs.sql on SMDC, 2026-12-04 04:09 UTC applied_as postgres, INSERT 0 0, COMMIT, exit 0; all 28 programs present before, surveys 44 rows and its tuple counters unchanged after
the same verb against a scratch cluster of the release's database image SQL error exit 1 with the file's transaction rolled back; missing file exit 1

Raw evidence: s3://roman-rapid-scratch/rapidpipe/foundation/qa/db-login-cleanup/t1/.

Divergences

The runbook's history rows that cite apply-dated-sql.sh are left as they are: they record what ran then.

Improvements seen

None.

Session notes

None.

Next / left

Merged after rapid_systems PR 593, so the command it names exists on rapid_systems main.

🤖 Generated with Claude Code

The command the README named, rapid_systems' cloudformation/apply-dated-sql.sh,
was deleted by its refactor; rapid_systems PR 593 restores it as
`rapidctl db apply ENV FILE`, proved on SMDC with
2026-11-17-survey-programs.sql (INSERT 0 0). postgres stays the schema's
owner (Ben, 2026-12-04).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@rusholme
rusholme merged commit 8d0f4cc into main Dec 4, 2026
5 checks passed
@rusholme
rusholme deleted the db-login-cleanup/1-apply-command branch December 4, 2026 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant