Blenra LogoBlenra
Optimized for: Gemini / ChatGPT / Claude
#Database

Automated Deadlock Prevention and Migration Performance Guardrails

Customize the variables below to instantly engineer your prompt.

Required Variables

deadlock-prevention-migration-guardrails.txt
Act as a Database Performance Tuning Expert. Write a ruthless 'Database Migration Security Policy' bash script designed to be executed as a mandatory, blocking linting stage within a [CI_CD_PIPELINE]. The script must parse raw SQL migration files (e.g., `.sql` Flyway files) and algorithmically scan for highly 'dangerous' DDL operations known to cause production outages (e.g., adding a new column with a heavy `DEFAULT` value in older PostgreSQL versions, or executing massive index creations without the `CONCURRENTLY` flag). The script must forcefully inject and enforce a strict session-level [MAX_LOCK_TIMEOUT] (e.g., `SET lock_timeout = '5s'`) at the top of every script to prevent catastrophic queue blocking. Tailor the regex scanning logic specifically to the known online DDL limitations of the [DATABASE_ENGINE] architecture.

Example Text Output

"A shell-based linter that scans SQL files for 'ALTER TABLE' statements without 'CONCURRENTLY' keywords and rejects the Pull Request automatically."

More Cloud & DevOps Prompts

View all →

Frequently Asked Questions

What is the "Automated Deadlock Prevention and Migration Performance Guardrails" prompt used for?

A shell-based linter that scans SQL files for 'ALTER TABLE' statements without 'CONCURRENTLY' keywords and rejects the Pull Request automatically.

Which AI tools work with this prompt?

This prompt is optimized for Gemini / ChatGPT / Claude, but works great with ChatGPT, Claude, Gemini, and other large language models. Simply copy it and paste it into your preferred AI tool.

How do I customize this prompt?

Use the variable fields above to fill in your specific details. The prompt will auto-update as you type, ready to copy instantly.

Is this prompt free?

Yes! All prompts on Blenra are free to copy and use immediately. No account required.