Governance: who approved this change
Six months from now somebody’s going to point at a column in production and ask three questions. Who put that there? Who said yes? What did they see when they said it? If the answer is “let me check Slack,” you don’t have governance. You have a memory.
The fix isn’t a new approval system. Your team already has one. It’s called a pull request, and your CI already knows how to make a deployment wait for a person. This module puts the schema package behind both, and then walks the trail backwards from a row in the production database to the human who approved it.
SchemaSmith doesn’t hold approvals. On purpose.
Section titled “SchemaSmith doesn’t hold approvals. On purpose.”Plenty of database tools grow their own review queue, their own sign-off screen, their own audit log. That’s a second, weaker copy of controls you already run for code. Two places to grant permissions. Two trails to reconcile. Two things an auditor has to trust.
SchemaSmith stays out of it. It does three things your controls can lean on: it tells you exactly what a deploy would do before it does it, it tells you whether a database matches the package, and it writes down every deploy with a pointer back to where it came from. Review, gate, record. GitHub does the rest.
Review: the plan goes on the pull request
Section titled “Review: the plan goes on the pull request”A package change goes up as a pull request like any other. The pipeline’s review job validates the package and runs a WhatIf against production, because production is what this change is headed for. With pr-comment: true, the SchemaSmith Deploy action posts the summary on the pull request:
- name: Preview the change against production uses: Schema-Smith/schemasmith-deploy@v2026.12.0 with: mode: whatif product-path: Package server: ${{ vars.DB_SERVER }} user: ${{ vars.DB_USER }} password: ${{ secrets.DB_PASSWORD }} pr-comment: trueThe pull-request comment and mode: drift arrive with the action’s 2026.12.0 release; until it’s published, that tag doesn’t resolve and the lab’s workflow can’t start.
In the lab you add a nullable Phone column to Customer. A minute later github-actions[bot] has commented:
## Targets (1)- localhost,11433 / orders_production — Main — Success — 3653ms...## Object Changes- Created: tables=0, columns=1, indexes=0, constraints=0, foreignKeys=0, procedures=0, views=0, functions=0One column created, nothing dropped, on the database that matters. Push another commit and the same comment updates instead of piling up. The exact statement sits in the job log, one click away. The reviewer approves the plan the deploy will actually run, not a guess about what a JSON diff might mean.
The workflow needs permissions: pull-requests: write for that comment. A pull request from a fork never gets it, or your secrets, so an outside contributor’s change waits for someone with write access to run it.
Promotion: staging has to prove it, then a person says go
Section titled “Promotion: staging has to prove it, then a person says go”Merge, and the same workflow runs its other two jobs. staging deploys, then runs --Drift against staging with nothing changed:
- name: Gate - staging matches the package uses: Schema-Smith/schemasmith-deploy@v2026.12.0 env: SmithySettings_KindleTheForge: "false" with: mode: drift # same connection inputs Main: no drift on all 1 target(s)No drift on 1 target(s)Exit 0 means the deploy landed whole and nothing else on staging disagrees with the package. Exit 5 fails the step, and production never starts. That’s the gate: not “the deploy didn’t error,” but “staging now matches the record.”
Then production stops and waits. Its job names a GitHub environment, environment: production, and that environment has a required reviewer. GitHub won’t run the job until a named person approves it, and it records who, when, and their comment:
approved by <you>: Reviewed PR #1: adds Customer.PhoneApprove, and production deploys, then drift-checks itself the same way. GitHub offers required reviewers on public repositories on every plan; on a private one your plan has to include them. The lab uses a public repository for that reason.
Audit: start from the database, end at a person
Section titled “Audit: start from the database, end at a person”Every deploy writes a row to SchemaSmith.DeploymentHistory in the target database (SchemaSmith_DeploymentHistory on MySQL and MariaDB, where a schema is a database). After the lab’s second production deploy, on PostgreSQL:
2|Success|1|c70892f5ac11…|https://github.com/<you>/schema-governance-lab/actions/runs/43738299076|<you>|postgresThat’s the deploy id, the outcome, one change applied, SourceCommit, PipelineUrl, Actor and DeployedAs. The commit is the merge, and GitHub knows which pull request it came from. The pipeline URL is the run, and the run knows who approved production:
gh api repos/<you>/schema-governance-lab/commits/<SourceCommit>/pulls --jq '.[] | "#\(.number) \(.title)"'gh api repos/<you>/schema-governance-lab/actions/runs/<run-id>/approvals --jq '.[] | "\(.state) by \(.user.login): \(.comment)"'#1 Customer: add Phoneapproved by <you>: Reviewed PR #1: adds Customer.PhoneTwo hops from a row in production to the change, the plan the reviewer read, and the person who signed off. Actor is whoever’s push started the run; DeployedAs is the database login it ran as. Neither is the approver. The approver lives where the approval happened, and the row points there.
Why the lab runs on your own machine
Section titled “Why the lab runs on your own machine”The jobs have to reach the sandbox on localhost, and a GitHub-hosted runner can’t. A service container doesn’t survive from one run to the next, and the audit beat needs production to still be there when you go looking. So the lab registers a self-hosted runner: a small agent you start in a terminal that takes jobs from your repository only. You run it for the length of the lab and remove it at the end. On a public repository the lab also turns on GitHub’s setting that holds outside contributors’ workflows for your approval, so nobody else’s pull request runs on your machine.
In production you’d point the same workflow at runners that can reach your real servers. The jobs don’t change.
Check yourself: A production deploy's DeploymentHistory row shows Actor = alice and DeployedAs = svc_deploy. Who approved the deploy, and where do you find out?
Neither. Actor is the GitHub user whose push started the run, and DeployedAs is the database login the deploy used. The approval is recorded on the pipeline run the row’s PipelineUrl points to: the run’s approvals (or its page) show who approved the production environment, when, and with what comment.
A smith doesn’t stamp his own work as inspected. The piece goes to the bench where the inspector already sits, gets looked over against the drawing, and only then goes out the door with a mark that says who passed it. That’s all this is. The plan goes to the pull request. Staging proves the cast holds. A named person opens the gate. And the maker’s mark on every deploy points back to all three. Review, prove, approve.
Want the action’s full set of inputs and what each mode does? The end-user guide’s CI/CD integration chapter has it.
Got an auditor asking questions your pipeline can’t answer yet? Email me at forgebarrett@schemasmith.com. I read every one.
Next up: Course 4 · Driving the tools, where custom properties and script tokens start telling the deploy what to do.
Until then, may every change carry its maker’s mark, and every mark lead back to the bench that passed it.
— Forge