Integer Key Exhaustion

Audit and fix 32-bit auto-increment keys before they overflow. Measure every integer identity or serial column against its sequence (pg_sequences last_value as a share of max_value) and MySQL AUTO_INCREMENT against the column type's maximum, referencing foreign-key columns included, rank by days remaining at measured growth, and alert at 50 percent. Months of runway means a new bigint column kept in sync, backfilled and swapped; weeks means a stated stopgap such as the negative end of the sequence or UNSIGNED. Inventory consumers that break on large ids before widening. Never enable CYCLE. Use for "sequence reached its maximum value", "are we going to run out of int ids", "Duplicate entry for key PRIMARY at 2147483647", "convert serial to bigint". Not for executing the type change, its expand/contract deploy and backfill (db-migration; this skill owns the runway and the choice, that one owns the execution), or keys for new tables (schema-design).

greenblacked Updated
The twenty-nine plugins: coding, family, gamedev, operations, delivery, security, manager, personal, career, design, llm, data, techdocs, assurance, client-apps

File contents

greenblacked/AI commit 528ef26553

Frequently asked questions

npx get-skill add greenblacked/integer-key-exhaustion