The engineering database schema migration governance decision record: why the approval model you chose determines your unauthorized change rate and your cross-service impact surface

Database schema migration governance is treated as a CI/CD pipeline configuration — which migration tool to use, how to run migrations before or after the application deploys, whether to allow rollbacks — not as an organizational governance decision whose consequences compound with every service added to the production environment, every shared table that accumulates more direct consumers outside the owner team, and every incident where the pressure to resolve a slow query exceeds the engineer's patience for the migration file process. The migration authorization model, the approval gate, and the cross-service impact analysis requirement are established when the team first sets up Flyway or Liquibase and the codebase is small enough that everyone knows who owns every table and which services query which columns directly. Those governance decisions propagate to every subsequent schema change, every cross-service dependency that accumulates without a registry entry, and every postmortem that asks why the production schema diverged from the documented migration history or why a column rename that passed all CI tests broke a downstream service that the owner team did not know was querying the table. Three founding choices — the migration authorization model, the approval gate design, and the cross-service impact analysis requirement — determine whether schema changes are applied with the organizational awareness that their consequences require or accumulate as undocumented drift in the most critical shared state in the production system.

A 32-person B2B SaaS providing an API management platform for mid-market software teams had been running database migrations through a standard CI/CD pipeline for two years. The migration process was automated end-to-end: when a pull request containing a migration file was merged, the pipeline ran the migration against staging, ran the full test suite, and if both passed, applied the migration to production on the next deployment cycle. No human review was required between test passage and production application. Any engineer who could merge a pull request could apply a schema change to production. The team had no policy distinguishing direct database access from migration-based changes; engineers held production database credentials distributed through the team's secrets management system, and the incident procedure described using those credentials to investigate query performance problems without specifying any constraint on applying schema changes directly.

At 11:23 PM on a Thursday, the team's most senior backend engineer received a PagerDuty alert: the platform's API request logging service was showing p99 response times of 4.2 seconds, well above the 800ms SLA threshold. She connected to the production database and ran EXPLAIN ANALYZE on the query that was at the top of the slow query log. The query was performing a sequential scan on the api_requests table — a 340M-row table — because a compound index that the query optimizer needed had been missing from the initial schema design. She created the index directly in production via psql: CREATE INDEX CONCURRENTLY idx_api_requests_account_created ON api_requests (account_id, created_at) WHERE deleted_at IS NULL. The index build took 11 minutes; at 11:36 PM the p99 latency dropped to 180ms and the incident was resolved. She added a note to the PagerDuty incident — "added missing compound index on api_requests, latency resolved" — and went to sleep. She intended to create a migration file the following morning but was pulled into an architecture review and a customer call; by Friday afternoon the index had been absorbed into the background infrastructure of a resolved incident and was not followed up on.

Six weeks later, a junior engineer wrote a migration to add a second partial index on api_requests for a new query pattern: CREATE INDEX CONCURRENTLY idx_api_requests_account_status ON api_requests (account_id, status) WHERE deleted_at IS NULL. The migration passed on staging, passed on the CI test suite, and failed on production with a unique violation error from the index creation — not because the new index conflicted with an existing index, but because the existing idx_api_requests_account_created index that had been created directly in production was not in the staging schema or the migration history, and the production database's index namespace collision rules rejected the migration due to an internal naming conflict in the concurrent index creation sequence. The migration failure triggered an investigation. The platform team ran a schema diff comparing the live production schema against the expected schema generated from all migration files in the repository. The diff returned seven discrepancies: five manually added indexes, one column added to the api_request_metadata table that had no migration file, and one dropped column on the users_sessions table that the migration history showed as still present but that did not exist in production. The team could trace five of the seven discrepancies to incidents or operational sessions from the previous six months; two discrepancies — the api_request_metadata column addition and the users_sessions column drop — could not be traced to any incident or any named engineer in the git history or the incident log. The team had been operating for six months with a production schema that had accumulated unauthorized changes at a rate of approximately one per month, with no mechanism to detect the drift or to enforce the obligation to create migration files for incident-time changes.

A 47-person data analytics company providing a managed business intelligence platform for growth-stage consumer brands had a production schema organized around a central users table that served as the primary entity for customer data across four services: a user-facing web application, an analytics pipeline that computed weekly engagement metrics, an audit service that logged all data access events against user records, and a reporting service that generated PDF and CSV exports for brand managers. The users table was owned by the web application team; the analytics pipeline, audit service, and reporting service all queried the users table directly because the web application had been built before the team had an internal API convention, and adding an API endpoint to mediate every table query had not been prioritized as the downstream services were added. The table ownership model existed informally — the web application team owned the users table in the sense that they wrote all migrations for it — but was not documented in any registry, and the downstream services' direct table access was not tracked in any ownership or consumer document.

The web application team proposed a migration to add a nullable preferred_name column to the users table between the existing email column (position 4) and the existing created_at column (position 5), making preferred_name column position 5 and shifting created_at to position 6 and all subsequent columns to their position plus one. The migration was reviewed by one other engineer on the web application team, who verified that the web application's queries all used named column access rather than positional column access, that the migration was backward-compatible for the web application's use cases, and that the new column was nullable with a sensible default. The migration was approved and applied to production. The web application team did not query the ownership model for direct consumers of the users table because no ownership model existed; they did not notify other service teams because they had no mechanism to identify which services required notification. The migration applied cleanly in 4 minutes at 10:15 AM on a Tuesday and the web application team closed the migration PR.

At 2:34 PM — four hours and nineteen minutes after the migration was applied — a customer support ticket arrived from a growth-stage consumer brand: their weekly engagement report, delivered automatically every Tuesday at 2:00 PM, was showing email addresses in the "first seen" column and dates in the "user email" column. The analytics pipeline that generated the weekly engagement report had been written by the data team 14 months earlier using psycopg2 to query the users table directly with SELECT *. The pipeline's transformation layer unpacked query result rows using positional column access — row[4] for email, row[5] for created_at — because the data engineer who had written it had used column position rather than column name as a performance optimization, reasoning that the users table schema changed rarely and the pipeline ran against millions of rows per execution where named column access added overhead. After the migration, row[4] returned preferred_name (NULL for all existing users, displaying as an empty string in the pipeline's string formatting), row[5] returned email, and row[6] returned created_at — the positions the pipeline's code had expected for email and created_at had each shifted by one. Every weekly engagement report generated after 10:15 AM had been produced from shifted column mappings. The reports that had been delivered at 2:00 PM to the platform's 23 active brand accounts all contained shifted data. The web application team, the data team, and the customer support team spent the next 6 hours rolling back the reports and communicating to affected customers. The post-incident review identified the root cause in 20 minutes; the remediation — rewriting the pipeline to use named column access — took 3 hours; the customer communication took longer than the technical fix.

A 58-person enterprise SaaS providing a contract management platform for mid-market legal and procurement teams had grown to a production schema of 94 tables, two of which had exceeded 20 million rows. The engineering team had experienced a painful migration incident 8 months earlier — a migration that added a unique constraint to a 15M-row table had locked the table for 9 minutes during peak usage, interrupting a customer's contract signing workflow and generating a formal complaint from a tier-1 account. Following that incident, the team implemented a DBA review requirement: all schema migration pull requests had to be reviewed and approved by one of the two engineers on the company's small DBA team before they could be merged. The DBA review requirement was added to the GitHub branch protection rules for the main branch; a migration PR could not be merged without a DBA reviewer's approval.

In the 6 weeks following the policy's implementation, the DBA team reviewed 23 migration pull requests and approved all 23. The average time between a migration PR being submitted and a DBA review comment appearing was 7 hours; the average time the DBA reviewer spent on each review, estimated from the timestamps between when the PR was opened and when the approval was submitted after a single comment cycle, was approximately 7 minutes. No migration was rejected or sent back for revision. The DBA team had no written review checklist; they applied their accumulated knowledge of database internals to each migration informally, with no structured requirement to check lock acquisition duration, cross-service impact, or rollback feasibility. Their review comments were typically one or two sentences — "looks good," "make sure staging is clean before merge," "you might want to add an index on the foreign key column" — with no documented reasoning about what had been checked and what had been deferred.

Three months after the review process was established, the billing team submitted a migration to add a foreign key constraint to the invoices table, enforcing referential integrity between invoices.contract_id and contracts.id. The invoices table had grown to 41M rows in the preceding year as the platform's enterprise customers generated invoices at high volume. The migration was approved by one DBA reviewer with the comment "referential integrity looks correct — make sure staging passes." The migration ran during a low-traffic window at 2:00 AM. The foreign key constraint addition on a 41M-row table required PostgreSQL to perform a full table scan to validate that every existing invoices.contract_id value had a corresponding contracts.id row; the validation scan held a ShareRowExclusiveLock on the invoices table for 23 minutes while it completed. At 2:11 AM — 11 minutes into the lock — the platform's automated invoice generation jobs, which ran on a 15-minute schedule independent of the deployment, began timing out on inserts to the invoices table. By 2:34 AM, 23 minutes into the lock, the constraint validation completed and the lock was released; the invoice generation queue had accumulated 47 failed jobs across 12 customer accounts. The DBA reviewer had not checked the lock acquisition behavior of a foreign key constraint addition on a table of this size; the review checklist did not prompt for a lock duration estimate; the reviewer's 7-minute review window was not sufficient to run the row count query and the lock duration estimate calculation that would have flagged the migration as requiring a staged approach — adding the constraint as NOT VALID first, then validating in a separate migration — to avoid the full-table lock. The governance process existed, the review authority existed, and the review had been performed; what the review had not performed was the specific lock acquisition analysis that the founding migration incident had identified as the class of risk the review process was designed to prevent.

Two structural properties these failures share

The three patterns above look like a missing post-incident follow-up procedure, an unfortunate SELECT * in a downstream service, and a DBA review checklist that needed one more bullet point. Each was identified as a tactical problem — the incident procedure needed a migration file obligation, the analytics pipeline needed named column access, the DBA review needed a lock duration estimate requirement. But each failure was caused by the same structural decision gap: the team made founding schema migration governance decisions (the authorization model, the approval gate design, the cross-service impact analysis requirement) during the period when the schema was simple enough and the team was small enough that the governance gaps did not produce visible failures, those decisions were encoded in pipeline configuration and informal norms, and the original reasoning was not recorded. When the failures surfaced — the schema drift from undocumented incident-time changes, the cross-service break from an undiscovered direct table consumer, the production lock from a review process that approved without analyzing — the teams diagnosed each as a tactical problem in the specific incident, specific service, or specific checklist rather than as a symptom of a schema migration governance model that had not been designed for the team size, schema complexity, and cross-service dependency density of a 30 to 60-person engineering organization. The two structural properties that bounded each team's schema change safety were the same in all three cases.

Unauthorized change rate. The direct database access policy component is the boundary condition for the unauthorized change rate: a team where any engineer holds production database credentials and the incident procedure contains no constraint on direct schema changes has effectively no barrier between incident pressure and schema modification outside the migration pipeline. The 32-person company's senior engineer had production psql access, a legitimate incident reason to add an index, and no procedure that required incident commander sign-off or a mandatory migration file obligation — the conditions that produced the unauthorized index were not an individual failure of follow-through but a governance model that created no structural friction between the temptation and the action. The migration CI/CD gate component sets the detection gap: a fully automated pipeline that applies migrations without human review cannot distinguish between a migration that is safe for the current production state and a migration that conflicts with an undocumented production change, produces an excessive table lock, or breaks a cross-service dependency — the 32-person company's pipeline applied the junior engineer's index migration to staging and found it safe, then failed on production because the production state had been modified outside the pipeline's visibility. The incident procedure exception component is the governance lever: a written incident procedure that specifies the conditions authorizing a direct database change, the sign-off required, and the 24-hour post-incident migration file obligation converts an informal practice that depends on individual discipline into a documented governance requirement whose non-compliance is detectable through the weekly schema drift check. The database schema migration execution model decisions that specify the expand-contract pattern and the rollback policy are the technical decisions that determine how migrations are structured; the governance decisions covered here determine whether those technically sound migrations are the only mechanism by which the production schema changes.

Cross-service impact surface. The table ownership model component is the information layer that makes cross-service impact analysis possible: a team that owns a table but does not know which other services query it directly cannot produce a notification list for a schema change because the information required does not exist in any system the owner team can query. The 47-person company's web application team owned the users table in every practical sense — they wrote all migrations, they understood the schema — but the ownership model contained no consumer registry, so the impact analysis that would have revealed the analytics pipeline's positional column access was structurally impossible without someone independently knowing to ask the data team about their query pattern. The impact analysis requirement component sets the gate on cross-service risk: a migration approval process that requires the owner team to query the consumer registry and document compatibility for every column rename, constraint addition, or type change converts a knowledge gap into a governance requirement — the 47-person company's migration review required one other web application engineer to verify named column access in the web application's own codebase, which was the right check for the owner team's service but the wrong scope for the cross-service impact that materialized. The communication protocol component determines how much time consumer teams have to respond before the migration runs: an advance notice window of 48 hours for simple changes and 7 days for changes that require consumer code modifications gives consumer teams the opportunity to identify compatibility issues before the migration is applied rather than after the first broken query returns shifted column mappings. The change data capture decisions that specify how downstream consumers receive schema change events are the complementary approach to the notification protocol — CDC consumers that subscribe to schema change events can receive machine-readable notification of table structure modifications rather than relying on advance human notification for every migration that touches a consumed table.

Five sections of the schema migration governance ADR

1. Migration authorization model

Migration authorization specifies three things: who is authorized to submit a schema migration, through which mechanisms a schema change may be applied to production, and what the exception process is for incident-time direct database access. Authorization for routine schema migrations should be broad — any engineer who can submit a pull request can submit a migration, subject to the approval gate described in section two — but the mechanism must be narrow: schema changes may only be applied to production through the CI/CD migration pipeline, not through direct database access. This distinction is the founding decision that the 32-person company's governance model had not made: allowing production database credentials to be used for incident response without a schema change constraint created a governance gap that accumulated unauthorized schema changes at a rate the team could not observe until a migration conflict forced a schema diff audit.

The break-glass exception for incident-time direct database access should be explicitly authorized and constrained in the incident procedure. The exception is appropriate for one specific case: adding a concurrent index on a table that is causing an active incident, where the index creation is non-destructive, can be applied with CREATE INDEX CONCURRENTLY to avoid table locking, and where the time cost of the migration pipeline process would materially extend the incident impact window. The exception requires three conditions: prior authorization from the incident commander or the engineering manager on call before the change is applied, a Slack or incident bridge log entry documenting the exact command applied before execution, and a migration file creating the same change submitted through the normal pipeline within 24 hours of the incident being resolved. Direct schema changes that modify column types, add NOT NULL constraints to existing columns, rename columns, drop columns, or add foreign key constraints are not authorized under the break-glass exception regardless of incident pressure — the risk of data loss, compatibility breaks, or extended table locks from these change types under incident conditions exceeds the benefit of bypassing the migration pipeline. The authorization model should be encoded in the incident procedure as a named section — not implied by the credential distribution policy or left to individual judgment — because the most likely moment for an unauthorized schema change is an incident at 2 AM when the engineer holding production credentials is under time pressure and the incident procedure is the reference they consult.

2. Migration approval gate

The migration approval gate specifies which migrations require human review before production deployment, what the review checklist covers, and what constitutes a valid approval. The gate applies to a risk-stratified subset of migrations rather than to all migrations: adding a new nullable column to a table with no cross-service consumers, adding an index CONCURRENTLY on a table under 5M rows, or creating a new table with no foreign key constraints are low-risk changes that can be applied with automated test passage as the only gate. The gate requires human review for four migration categories: large-table changes (any migration on a table with more than 5M rows, regardless of change type), destructive changes (dropping a column, renaming a column, dropping a table, changing a column's type), constraint additions (adding a foreign key constraint, adding a unique constraint, adding a NOT NULL constraint to a column with existing rows), and cross-service impact changes (any change to a column in a table listed in the cross-service impact registry with known direct consumers outside the owner team).

The review checklist for each category has required items that the reviewer must attest to completing before the approval is submitted. For large-table changes: the reviewer must run a row count query on the production table, estimate the lock duration for the specific migration type using the database engine's documented locking behavior, verify that the migration uses the minimum-lock approach (CONCURRENTLY for index creation, NOT VALID plus separate VALIDATE for foreign key additions), and confirm the deployment window is outside peak traffic hours. For destructive changes: the reviewer must assess whether the migration can be safely reversed after production writes on the new schema, specify the rollback procedure in the migration PR description, and confirm that the migration uses the expand-contract pattern documented in the database migration strategy decision record rather than a single-step rename or drop. For constraint additions: the reviewer must verify the lock acquisition behavior using the specific production table's row count — not an estimate from staging — and require a staged migration (NOT VALID constraint plus VALIDATE CONSTRAINT in a separate migration) for any foreign key addition on a table with more than 10M rows. For cross-service impact changes: the reviewer must verify that the owner team has queried the ownership registry, produced a consumer notification list, sent advance notice to all identified consumers, and received compatibility confirmations from each consumer team before the migration is approved. The approval comment in the pull request must reference the checklist items completed, not simply state "looks good" — the 58-person company's DBA review process failed because the approval was submitted without the specific lock duration analysis that the review authority existed to enforce.

3. Cross-service impact model

The cross-service impact model specifies how the team maintains the information required to perform cross-service impact analysis and what the analysis process is before a schema change is submitted for approval. The table ownership registry is the central artifact: a table in the team's internal documentation system (a Confluence page, a Notion database, a markdown file in the platform team's repository) with one row per table in the production schema, recording the owning team, the access contract (API-only access versus permitted direct query access, with documentation of which consumer teams have approved direct access and under what conditions), and the list of known direct consumers outside the owner team. The registry is maintained through two mechanisms: owner team updates when they add a new table or formally authorize a new direct-access consumer, and a quarterly audit that runs query log analysis to discover services submitting queries to tables they are not registered as consumers of. The quarterly audit output is a list of unregistered direct consumers that the registry must be updated to reflect; unregistered consumers discovered in the audit are contact-audited by the platform team to understand the query pattern and assess whether direct access is appropriate or whether the service should be migrated to the owner team's API.

The impact analysis process for a schema change has three steps. First, the proposing team queries the ownership registry for the affected table to generate the consumer list. For tables with no registered direct consumers, the impact analysis is complete with a written attestation in the migration PR description. For tables with registered direct consumers, the proposing team must classify the proposed change by its compatibility risk: additive changes (adding a new nullable column, adding a new table) are forward-compatible with all existing query patterns and require notification but no consumer code changes; non-additive changes (renaming a column, adding a NOT NULL constraint, changing a column type) may require consumer code changes and require active compatibility verification from each consumer team before the migration is approved. Second, the proposing team sends advance notice to consumer teams through the notification protocol: the advance notice includes the migration PR link, the specific change description, the proposed deployment date, and a request for the consumer team to verify compatibility and respond by a specified date. The advance notice window is 48 hours for additive changes and 7 days for non-additive changes; a consumer team that does not respond within the window is treated as having no incompatibility concerns, with the proposing team's attestation in the migration PR documenting the notification and non-response. Third, the approval gate review verifies that the notification process was completed and that any consumer compatibility concerns raised during the advance notice window have been resolved before the migration is approved for production deployment.

4. Migration staging and production gate

The migration staging gate specifies the sequence that must be completed before a migration is applied to production: the migration must be run on the staging environment and the staging schema must be verified as matching the expected post-migration state before the production deployment is approved. This requirement exists because staging and production schemas can diverge through the same unauthorized change mechanisms that the authorization model is designed to prevent — a staging environment that has not received all the migrations that have been applied to production, or that has received additional migrations not yet applied to production, provides incomplete signal for whether the migration will apply cleanly in the production environment. The staging verification step in the CI pipeline should be an explicit check — running the migration tool's pending migration report against staging and failing the CI run if the staging schema does not match the expected migration history state — rather than an implicit assumption that staging CI passing means staging matches production.

The production deployment window policy specifies when migrations in the large-table or constraint-addition categories may be deployed to production. For migrations with an estimated lock duration of more than 30 seconds, the deployment window is restricted to outside peak traffic hours — defined per service based on the traffic patterns in the monitoring dashboard, not as a fixed time window that may not reflect the service's actual usage pattern. The deployment window policy should specify the engineer responsible for monitoring the migration's progress during deployment and the rollback trigger — the conditions under which the migration would be rolled back rather than allowed to complete. For migrations using CONCURRENTLY index creation or NOT VALID constraint addition, the rollback trigger is a production incident created by a downstream effect of the migration rather than by the migration itself, since these migration types do not hold blocking locks. For migrations that hold a brief ShareRowExclusiveLock (such as adding a check constraint on a small table), the rollback trigger is a p99 latency spike above 2× baseline on the affected table's primary query paths during the deployment window. The monitoring window after the migration completes is 30 minutes of active observation by the deploying engineer before the deployment is declared successful; a migration that is applied and immediately forgotten without a monitoring window produces the same outcome as a migration applied at 2 AM with no one watching the application metrics.

5. Schema change audit trail and drift detection model

The schema change audit trail specifies how every schema change applied to every environment is recorded, by whom, with what approval trail. The migration tool's execution log — the record of which migration files have been applied to each environment and when — is the primary audit trail; the platform team is responsible for ensuring the migration log is backed up and that it cannot be modified outside the migration tool's normal execution path. The audit trail is supplemented by the pull request and approval history in the version control system: every migration file has a corresponding PR with the reviewer's approval and the review checklist attestation, providing an audit record that connects the schema change to the engineer who proposed it, the reviewer who approved it, and the date it was reviewed. For incident-time direct database changes authorized under the break-glass exception, the audit trail includes the Slack or incident bridge log entry documenting the command applied and the timestamp, the incident ID it references, and the migration file submitted within 24 hours that formalizes the change — the audit trail for a break-glass change must be complete enough that a future engineer running the schema diff audit can trace every production schema discrepancy to a named incident and a named engineer.

The schema drift detection mechanism is an automated job that runs weekly and computes the checksum of the live production schema against the expected schema generated by applying all migration files in the repository from scratch on an empty database. The diff output — the set of objects present in production but absent from the expected schema, and the set of objects present in the expected schema but absent from production — is posted to the platform team's monitoring channel as a weekly report. A clean report (zero discrepancies) is a positive signal that the authorization model is functioning; a report with discrepancies triggers an investigation to determine whether each discrepancy is a known authorized break-glass change awaiting its migration file, an unknown unauthorized change, or a migration tool bug. The drift detection job should run on a database copy rather than on the live production database to avoid any read contention during the schema analysis — a pg_dump --schema-only run against a production replica is sufficient for the checksum computation. The incident command model decisions that specify the post-incident review process are the organizational mechanism that makes the break-glass exception's post-incident migration file obligation enforceable: a post-incident review that includes a schema drift check as a standard agenda item converts the obligation from an informal expectation to a governance requirement whose non-completion is surfaced before the weekly automated drift report.

Further reading

  • The database schema migration decision record — the migration execution model, rollback policy, and schema drift detection decisions that determine how migrations are technically structured; schema migration governance decisions (who approves, what constitutes a complete review, how unauthorized changes are detected) are organizationally upstream of the execution model — a governance model that prevents unauthorized changes preserves the integrity of the execution model's assumptions about the production schema state.
  • The database migration strategy decision record — the migration strategy decisions for handling zero-downtime deployments, expand-contract patterns, and multi-step destructive change sequences; the approval gate described here is the organizational governance for the same migration patterns — an approval gate that checks for expand-contract compliance at review time prevents the execution-model decisions from being bypassed under deployment pressure.
  • The change data capture decision record — CDC consumers that subscribe to schema change events receive machine-readable notification of table structure modifications; the cross-service impact model described here is the human-coordination complement to CDC's automated schema change propagation — both are required for a complete cross-service schema dependency model, since CDC covers the data stream while the ownership registry covers the query pattern.
  • The incident command system decision record — the incident command model that governs the break-glass authorization process; the incident commander's sign-off requirement for direct production database access, the post-incident review process that surfaces schema drift, and the deployment monitoring window are all points where the incident command model and the schema migration governance model share a governance boundary.
  • The WhyChose open-source extractor — run locally against your ChatGPT or Claude export to surface the schema migration governance decisions buried in your founding database setup sessions — the break-glass authorization reasoning, the cross-service access contract debates, the approval gate design decisions — structured as decision records with original-chat backlinks so the founding governance reasoning is recoverable when the first schema drift audit reveals discrepancies the team cannot explain.

FAQs

What should a schema migration approval checklist include and when is human review required?

Human review is required for four migration categories: large-table changes (tables over 5M rows), destructive changes (column rename, drop, type change), constraint additions (foreign key, unique, NOT NULL on existing rows), and cross-service impact changes (columns in tables with registered direct consumers). The review checklist requires attestation to specific completed checks: lock duration estimate using the actual production row count for large-table and constraint migrations, expand-contract compliance for destructive migrations, and consumer notification completion for cross-service impact migrations. An approval submitted without the checklist attestation items is not a valid approval — the 58-person company's DBA review process approved a foreign key constraint migration on a 41M-row table without the lock duration calculation that would have flagged the need for NOT VALID staging.

How should a team handle schema migrations applied directly to production during an incident?

Direct schema changes during incidents are authorized only for adding a concurrent index — non-destructive, minimum-lock, with incident commander sign-off before execution and a Slack entry documenting the exact command. All other schema change types (column modifications, constraint additions, type changes) are not authorized under the break-glass exception regardless of incident pressure. Within 24 hours of the incident being resolved, the engineer who made the change must submit a migration file through the normal pipeline. A weekly automated schema drift detection job — comparing the production schema checksum against the expected schema from migration history — surfaces any break-glass changes whose migration files were not submitted, converting the post-incident obligation from an informal expectation to a detectable governance requirement.

What is a table ownership registry and how does it support cross-service impact analysis?

A table ownership registry records, for each table in the production schema, the owning team, the access contract (API-only or direct query permitted), and the known direct consumers outside the owner team. The registry is maintained through owner team updates and a quarterly query log audit to discover unregistered direct consumers. Before any non-additive schema change (column rename, constraint addition, type change), the owner team queries the registry, notifies registered direct consumers with 7 days advance notice, and receives compatibility confirmations before submitting the migration for approval review. The registry is what makes cross-service impact analysis possible — without it, the owner team has no mechanism to discover the analytics pipeline that queries their table with SELECT * and positional column access until the migration breaks it in production.

How do database schema migration governance decisions connect to AI chat sessions and what gets lost without a decision record?

Schema migration governance decisions are made in AI chat sessions during the team's first migration-related incidents: the first time a migration fails because the application and schema deployed in the wrong order, the first time a rollback is attempted after production writes exist, and the first time an engineer bypasses the pipeline during an incident. The founding engineer debates the approval gate design with Claude, asks what the incident procedure should say about direct database access, and discusses the cross-service notification protocol. Each decision is encoded in pipeline configuration and incident runbook sections and treated as background infrastructure within weeks — the original reasoning behind why the break-glass exception was limited to index additions, why the advance notice window is 7 days for non-additive changes, and why the drift detection job runs weekly rather than daily is gone within a quarter of the first cross-service migration incident. The founding schema migration governance ADR preserves that reasoning so the next migration incident begins with an audit of explicit governance gaps rather than an open-ended investigation of why the CI-passing migration caused production damage the test suite did not predict.