migration-close

Diff new migration tables against truncation SQL lists and run db:custom-sql.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/Rwb3n/callsheet --skill migration-close
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: migration-close
Source: https://github.com/Rwb3n/callsheet/tree/main/.claude/skills/migration-close
Command: npx skills add https://github.com/Rwb3n/callsheet --skill migration-close

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Post-migration checks to ensure new tables are included in truncation lists, run db:custom-sql, and optionally verify that tables exist after drizzle migrations.

Core Features & Use Cases

  • Diff new migration tables against TRUNCATE_ALL_TABLES_SQL and DELETE_ALL_TABLES_SQL to catch missing entries and ensure test-utils.ts integrity.
  • Provide exact edits for test-utils.ts in reverse-FK order when new tables are not present in the lists.
  • Run db:custom-sql after drizzle-kit push to apply custom extensions, triggers, and indexes.
  • Optionally verify new tables exist in the database and report results.
  • Produce a concise summary of new tables, list status, custom-sql execution, and verification results.

Quick Start

After completing a migration, run the migration-close check to validate truncation lists, apply custom SQL, and optionally verify table existence.

Frequently Asked Questions about migration-close

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automate post-migration checks for new tables in drizzle-kit?

To automate post-migration checks for new tables in drizzle-kit, you diff new migration tables against TRUNCATE_ALL_TABLES_SQL and DELETE_ALL_TABLES_SQL. This catches missing entries, ensures test-utils.ts integrity, and verifies table existence.

Why are my new Postgres tables missing from the test-utils truncation list?

New Postgres tables are missing from truncation lists because drizzle-kit migrations do not automatically update test-utils. You must diff new tables against TRUNCATE_ALL_TABLES_SQL and DELETE_ALL_TABLES_SQL, then apply exact edits in reverse-FK order.

What is the best way to ensure test-utils consistency after a drizzle migration?

The best way to ensure test-utils consistency after a drizzle migration is to identify new tables and perform a diff against TRUNCATE_ALL_TABLES_SQL and DELETE_ALL_TABLES_SQL. This provides exact edits for test-utils.ts in reverse-FK order.

Does migration-close work with Postgres custom SQL extensions and triggers?

Yes, it works with Postgres custom SQL extensions by running db:custom-sql after drizzle-kit push. This applies custom extensions, triggers, and indexes to update the database schema as part of the migration summary.

When do I need to verify truncation lists and run db:custom-sql?

You need to verify truncation lists and run db:custom-sql after running drizzle-kit generate or push. This ensures new tables are captured in test-utils, custom extensions are applied, and optionally verifies table existence in the database.