What problem does it solve? SQL migrations fail when DDL statements execute in the wrong order, such as functions referencing tables that do not exist yet or RLS policies created before their tables. This Skill lints migration files for safe execution order before you run them against a database. ## Core Features & Use Cases - DDL Section Extraction: Parses migration files with awk to identify extensions, tables, functions, triggers, RLS policies, and views along with their line numbers. - Heuristic Order Checks: Detects common problems like functions defined before tables, RLS before table creation, and triggers before their functions. - Dependency Pattern Guidance: Documents correct ordering for foreign keys, functions calling functions, views on views, and RLS policies using helper functions. - Use Case: Before applying a PostgreSQL migration that creates tables, functions, triggers, and RLS policies, run this check to catch ordering mistakes in seconds instead of hitting a failed migration and partial schema state. ## Quick Start Verify the DDL execution order of my migration file at supabase/migrations/20240101_init.sql and report any ordering issues.