AiSkillz

Early "As-Is" Access - free for the first 20 accounts. 18 of 20 places left: complete registration to claim one. No credit card needed.

← Back to skills
Backend & APIsVia MCPAny / model-agnosticLicense: My own work (all rights reserved)

Safe Postgres migrations

Created by CodeCraft LLC

Write, plan, and review safe PostgreSQL schema migrations for live systems (Supabase, raw SQL, EF Core, Prisma, Drizzle)

Product and technology names are trademarks of their respective owners, used only to identify what this skill covers. CodeCraft LLC is not affiliated with or endorsed by them.

by Jace (@jamick)v1.6.2 · updated 2026-12-01Report copyright infringement

Description

Write, plan, and review safe PostgreSQL schema migrations for live systems (Supabase, raw SQL, EF Core, Prisma, Drizzle) — expand/contract for zero-downtime changes, lock-aware DDL (lock_timeout, CREATE INDEX CONCURRENTLY, NOT VALID constraints then VALIDATE), adding columns and defaults, renames and type changes, batched backfills, enum changes, RLS and grants for new objects, transaction behavior of migration tools, testing on production-like data, and rollback/forward-fix plans. Use whenever the user writes or reviews a migration, alters a table in production, adds an index or constraint to a large table, renames or drops a column, or asks why a deploy locked the database.

#backend#postgres#migrations

Included with all-access

$9.00 one-time, permanent access

Get all-access · $12.00/mo, billed yearly

or

Buy 2 or more together for up to 40% off · View cart

You get a licence, not ownership. Access lasts while this skill is available on AiSkillz; if it's removed within 90 days of purchase, we'll send you a copy to keep. Terms

Official and free skills are included with the all-access subscription

Changelog

Subscribers also see which files changed in each version.

v1.6.2Dec 1, 2026Latest

Added

  • README: a **Sources** line listing the official pages the skill is written from, each link checked, so the source-overlap check can run against them.
v1.6.1Nov 29, 2026

Changed

  • Added a contents list to reference files over 100 lines (zero-downtime-playbook.md), so a partial read still shows every section.
v1.6.0Nov 28, 2026

Fixed

  • Playbook rename and new-column flows backfilled before dual-write was live, so rows inserted by old pods in between were missed; dual-write (code or trigger) now comes first, and new columns start with a constant default.
  • Plain CREATE INDEX was said to block all reads; it takes a SHARE lock that blocks writes only (Postgres explicit-locking docs).
  • Removed the playbook's duplicate checklist; its items moved into review-checklist.md.

Changed

  • Checked against the PostgreSQL 19 release notes, the versioning policy and the explicit-locking docs (November 2026); playbook SQL re-run on Postgres 18.
  • Version assumptions: Postgres 15-19 (14 reached end of life November 12, 2026).
  • Deep-dive section made on-demand with open/skip triggers; checklist listed.

Added

  • PostgreSQL 19: REPACK ... CONCURRENTLY replacing VACUUM FULL/CLUSTER; upgrade notes (btree_gist inet/cidr blocks pg_upgrade, FTS/pg_trgm reindex and tsvector recompute, standard_conforming_strings always on, max_locks_per_transaction 128, JIT off).
  • IF NOT EXISTS silently keeping an INVALID index, statement_timeout/transaction_timeout for migration sessions, non-transactional statements list, EF Core 10 migration transaction change; pitfalls and checklist items.
v1.5.0Nov 20, 2026

Added

  • Review method: every code review starts by mapping the code flows in scope and gives each flow its own sub-agent at high effort, which reviews that flow end to end against this checklist; the main agent merges, re-checks Blockers and de-duplicates. Covers single-flow reviews, nested sub-agents, failed sub-agents and environments without sub-agents.
v1.4.0Nov 6, 2026

Changed

  • Review report rule: reviews that cover changes (a diff, PR or uncommitted work) open with a short "What the changes do" section - factual bullets grouped by purpose, inferred intent marked, deploy or migration impact stated.
v1.3.0Nov 4, 2026

Changed

  • Review report rule at the top of the skill, loaded before any review: one entry per finding as Level · type · file:line · finding · proposed fix, outside facts sourced or marked unverified, and no narrative.
v1.2.2Nov 1, 2026

Changed

  • README: "Pairs with" now lists drizzle, prisma, app-search.
v1.2.1Oct 31, 2026

Changed

  • References updated for renamed skills: supabase is now supabase-platform, eas-workflows is now eas-workflows-ci, skill-creator is now skill-creator-aiskillz.
v1.2.0Oct 16, 2026

Added

  • references/zero-downtime-playbook.md: a step-by-step zero-downtime playbook (expand-contract, NOT VALID constraints, batched backfills in a procedure) - merged from the former database-migrations skill.
v1.1.0Oct 3, 2026

Changed

  • Checked against the official documentation (October 2026).
  • Added Postgres 18 NOT NULL ... NOT VALID (and named NOT NULL constraints) as a lighter way to add NOT NULL.
  • Added Postgres 18 upgrade pitfalls: generated columns virtual by default, AFTER triggers running as the queuing role, MD5 passwords deprecated.
v1.0.1Oct 3, 2026

Changed

  • Added a trademark notice to the README.
v1.0.0Oct 2, 2026

Added

  • First release.