Shows how to deploy EF Core migrations to production only as a reviewed, immutable artifact: generate idempotent SQL in CI, allowlist and SHA256-hash it, require explicit opt-in and approval, rehearse on staging, back up, and apply under transaction and advisory lock. Use for gated production EF Core releases. Not for…
Fixes the situation where an agent applied a ref fix to the wrong schema.yml file in a project with several schema files. Use when a patch landed in a duplicate or similarly named YAML and the error persists. Not for fixes applied to the wrong model SQL.
Recovery and prevention for running alembic with the dev alembic.ini against the production database: assessing what the dev config changed, and separating configs per environment. Use when the wrong ini file targeted the wrong database or applied dev settings to prod. Not for correct-config migrations that failed.
Vectle found the following relevant skills: - agent ran prisma migrate dev against the shared staging database and wiped everyone's data - [agent ran the migration against production because DATABASE_URL pointed at prod in its shell - how to gua…
How to fix a migration that passed locally on sqlite but failed in production on postgres: reproducing on real postgres, fixing the dialect differences, and making CI test against postgres. Use when the local/prod database mismatch hides failures. Not for failures that reproduce on postgres locally.
Vectle found the following relevant skills: - agent ran the migration against production because DATABASE_URL pointed at prod in its shell - how to guard against... - [agent squashed migrations locally but production still runs the old files - h…
How to fix a rollback script that references columns that no longer exist because the down migration was never tested: repairing the down migration and adding up/down testing to CI. Use when rollback fails on a stale down migration. Not for rollbacks that fail for data reasons.
Vectle found the following relevant skills: - my agent added a database reset to the failing test instead of finding the test that skipped its teardown on failure - [agent applied migrations out of order - it skipped a revision and now the schem…
Response playbook for an ALTER TABLE that ran 6 hours blocking deploys because no statement_timeout was set: stopping it safely, setting timeouts, and using online schema-change tools instead. Use when a DDL statement runs unbounded and blocks everything behind it. Not for slow DML or stuck queries.
Recovery when an agent's idempotency check read the wrong state table (flyway_schema_history instead of alembic_version): reconciling the real state and fixing the agent's procedure to check the tool the app actually uses. Use when a migration was skipped or double-applied because the agent consulted the wrong history…
Vectle found the following relevant skills: - agent updated the wrong snapshot file in a monorepo: how to scope - docs agent failed: committed generated docs to the wrong directory
Vectle found the following relevant skills: - agent dry-ran the codemod and the output looked right, then the real run rewrote files the dry-run had skipped - agent's eval comparison used different seeds across runs: nondeterminism fix
Vectle found the following relevant skills: - agent keeps re-running prisma migrate dev because drift detection flags its own shadow database as drift - [prisma migrate dev hung because the agent couldnt answer the interactive reset-the-database…
Vectle found the following relevant skills: - agent d1 migration locked the table during peak traffic - agent's suggested index fixed the SELECT but the migration locked the table for 40 minutes during the ALTER
Recovery when an agent deployed the app before the migration job finished and new code queries a column that does not exist yet: stabilizing the deploy, finishing the migration, and wiring the ordering so it cannot recur. Use when deploy and migration raced. Not for code bugs unrelated to schema timing.
Vectle found the following relevant skills: - agent added a column with a default to a 500M-row table and postgres is rewriting the whole table while the app is live - [agent sent 'Hi there' to 500 CEOs because the first_name column was null in …
Recovery and prevention for an agent that assumed DDL was transactional on mysql: the half-applied migration cannot be rolled back because mysql commits DDL implicitly. Use when a mysql migration failed midway and left a partial schema. Not for postgres, where transactional DDL usually allows rollback.