Urgent.News

What's breaking now, across thousands of outlets.

Tech

Catch risky SQL migrations in pull requests before they lock production

Most migration incidents aren't exotic: a DROP COLUMN that an old app instance still reads, an ALTER COLUMN ... SET NOT NULL that scans a 200-million-row table, a CREATE INDEX without CONCURRENTLY that blocks writes for minutes, an UPDATE that forgot its WHERE . I build MigrationGuard , a JetBrains plugin that reviews migration SQL as you write it, and I've just released a free GitHub Action that…

Most migration incidents are not exotic occurrences. They often involve actions like dropping a column that an old application instance still reads, altering a column to set it as NOT NULL which scans a large table, creating an index without the CONCURRENTLY option that blocks write operations for a short while, or running an update without specifying a WHERE clause.

The developer behind MigrationGuard, a JetBrains plugin, has now developed a free GitHub Action that inspects migration SQL as you write it. This tool can be incorporated into a repository by naming it Migrations on pull_request jobs: migrationguard. The action only examines the .sql files altered in the pull request, highlighting risky lines, explaining safer alternatives for each, and halting the job if the risk level is high or critical.

The tool does not transmit any data outside its execution environment. It identifies the following elements for free: DROP TABLE/DROP COLUMN and TRUNCATE UPDATE/DELETE without WHERE, alteration of column types that rewrite or delete data, and PostgreSQL CREATE INDEX without CONCURRENTLY. The dialect of the database (PostgreSQL or MySQL) is automatically recognized from the file, the user's Spring/Flyway/Liquibase configuration, or the JDBC driver dependency.

Users can also specify the dialect in the .migrationguard.yml file. For IntelliJ IDEA Ultimate and DataGrip users, the IDE plugin displays these findings while typing. The Pro version of the plugin includes additional checks such as rolling-deploy and locking rules (like unsafe NOT NULL, volatile defaults, renames, constraint changes, and MySQL table rebuilds), a comprehensive audit of the whole project, and an audit of only the migrations altered in the current branch.

A 7-day free trial of the tool is available. You can access the GitHub Action through the following link: https://github.com/jog16889/migrationguard-action. The JetBrains plugin is accessible here: https://plugins.jetbrains.com/plugin/34107-migrationguard. A brief demonstration of the plugin's functionality is available at this link: https://youtu.be/hWC3Dp3_zIs. Feedback is welcome, particularly for any false positives arising from genuine migrations.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

15 Common Shopify Problems and How to Fix Them (Beginner Guide)

Originally published on CodingCush . Almost every new Shopify store hits the same handful of problems: products that refuse to appear, a checkout that sulks, a domain stuck on "pending", a password…

  • Store missing from Google search results; check indexing status
  • Products not displaying; ensure active status and correct collection
  • Billing issues causing unavailable store message; review Settings → Billing

Processing Image Thumbnails Before Upload: Python Timeout Budgets for Game Assets

Short answer: processing image thumbnails times out before upload when decode and resize consume the request budget; measure those phases separately, keep game assets private, and move resizing to a…

  • Measure decode, transform, and upload phases separately to identify bottlenecks.
  • Use private objects with short-lived signed reads to prevent accidental publishing.
  • Instrument both paths before making changes to handle upload boundary issues.

Ci/Cd Pipeline Design: Checklist for Teams

A reliable CI/CD pipeline should do more than automate builds and deployments. It should help teams detect defects early, enforce security controls, release consistent artifacts, and recover quickly…

  • Pipeline should have clear, documented path from code changes to releases
  • Build quality and artifacts must be reproducible, identifiable, and secure
  • Security controls, including dependency vulnerability scans, must be integrated

More from Thursday 29 October →