Back to browse
GitHub Repository

Linter for dangerous Postgres migration patterns in Diesel and SQLx. Prevents downtime caused by unsafe schema changes.

114 starsRust

Diesel-guard adds custom checks via Rhai for Postgres migrations

by ayarotsky·Feb 17, 2026·1 point·0 comments

AI Analysis

●●SolidNiche GemSolve My Problem
The Take

It flags concrete dangerous patterns (example: ADD COLUMN with DEFAULT) and prints step-by-step safe alternatives instead of vague warnings. The embedded Rhai-based custom checks are a smart move — teams can encode org policies — but usefulness will depend on CI integration and the breadth/precision of its rule set.

Target Audience

Backend developers, DBAs, DevOps engineers working with Postgres migrations

Similar Projects

Spawn – Postgres migration/test build system with minijinja (not vibed)

Edit-in-place components + per-migration snapshotting is a neat practical solution to the classic migration-versus-repeatability tradeoff: you keep readable Git diffs for functions but spawn pins exact component versions into lock.toml and compiles them into atomic SQL transactions. Minijinja macros and JSON-driven data generation make writing repeatable tests and fixtures much less painful. The only obvious limit today is Postgres-via-psql only, but the compilation/snapshot model feels like a real workflow improvement for teams that live in the database.

Niche GemWizardry
Winsaucerer
103mo ago
Developer Tools●●Solid

A universal code formatter using Rust, Tree-sitter, and Rhai

Neatify exposes AST-level formatting as live Rhai scripts, so you write real code to shape output instead of tweaking a dozen JSON flags. The Tree-sitter backbone means any language with a grammar can be targeted, and the repo-first flavoring plus LLM-assisted script generation is a smart, practical twist. It's clearly early-stage (defaults modify files in-place and coverage is limited), but the architecture is an interesting alternative to opinionated, black-box formatters.

WizardryNiche Gem
its-a-new-world
233mo ago