SQL & Data Code Hygiene
Migration, transaction, locking, query-plan, and data-access hygiene.
Choose a focused SQL & Data recipe
This collection contains 3 bounded SQL & Data workflows. Choose the recipe whose objective matches the repository evidence instead of combining unrelated cleanup into one run.
- SQL migration idempotence and rollback hygiene: Use it to make schema migrations ordered, restartable where required, and operationally reversible.
- SQL transaction, locking, and concurrency hygiene: Use it to make transaction scope and concurrent update behavior explicit.
- SQL query plan, index, and N+1 hygiene: Use it to remove proven query amplification and plan regressions using representative evidence.
How to use this collection
Read the repository’s configured runtime, compiler, framework, analyzer, and test commands before selecting a workflow. Start in audit mode, record file and symbol evidence, and authorize a fix only after the candidate scope is reviewable. Preserve supported versions, public behavior, and existing tool configuration.
If the evidence is a named CVE, scanner finding, exposed secret, authorization flaw, or injection path, use the focused vulnerability-remediation playbook instead of a code-hygiene recipe. Stop when the safe result requires an owner decision about architecture, compatibility, production data, or deployment state.
Full recipe list
SQL migration idempotence and rollback hygiene
developmentSQL migration idempotence and rollback hygiene: Make schema migrations ordered, restartable where required, and operationally reversible.
SQL transaction, locking, and concurrency hygiene
developmentSQL transaction, locking, and concurrency hygiene: Make transaction scope and concurrent update behavior explicit.
SQL query plan, index, and N+1 hygiene
developmentSQL query plan, index, and N+1 hygiene: Remove proven query amplification and plan regressions using representative evidence.