Continuity runbook: Production DB surgery
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 180
- Forks
- 137
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 21
Description
Task
A second maintainer can run targeted SQL on production Postgres only through scripts/db/surgery-opencreorg.sh, with backup-first and the destructive confirmation phrase when needed.
Success criteria
- Dry-run documented: how to classify a SQL file as destructive vs not
- Operator will not run destructive SQL without exact
I_UNDERSTAND_OPENCREORG_PROD_DB_DESTRUCTIVE_ACTIONplus--destructive - No ad-hoc
heroku pg:psqlworkaround in the runbook path - Runbook
docs/continuity/runbooks/production-db-surgery.md(skillcontinuity-production-db-surgery)
Context
.cursor/rules/production-db-ops-safety.mdc- Wrapper does not parse SQL for DROP; humans must pass
--destructivewhen the file deletes/drops
Constraints
- existing maintainers only
- Confirm
APP_NAME(defaultopencreorg) and the SQL file path before running - Never paste
DATABASE_URL
Agent prompt
See Agent prompt in docs/continuity/runbooks/production-db-surgery.md.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read .cursor/rules/production-db-ops-safety.mdc, scripts/db/surgery-opencreorg.sh, and the existing docs/continuity/runbooks/production-db-surgery.md. Verify the runbook covers dry-run classification, backup-first execution, the exact destructive confirmation and --destructive requirement, APP_NAME and SQL path confirmation, and the prohibition on ad-hoc heroku pg:psql or exposing DATABASE_URL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, shell
- Domain
- databases, documentation, security
- Issue type
- Documentation
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100