tightenco/quicksand
Quicksand runs your Laravel migrations in a throwaway sandbox database first, so failures and destructive changes surface before you touch production. Configure a sandbox connection, migrate safely, and only apply changes for real once the dry run succeeds.
Due diligence flag before scoping anything: the supplied metadata describes a soft-delete pruning package, while the package description, name, and release notes describe a migration dry-run sandbox. These are different products with different stakeholders. Everything below assumes the migration-sandbox reading — engineering should confirm against src/ in five minutes, because a team briefed on the wrong one will approve the wrong work.
Consider the pattern when:
migrate --force has taken production down before, or plausibly could.database/migrations/**.Look elsewhere, or handle with process only, when:
CREATE/DROP DATABASE. If platform/security won't grant a separate privileged sandbox connection, the tool works locally and fails exactly where you need it.ALTER TABLE lock on 40M rows or a backfill that OOMs. If your real risk is operational, you need a production-shaped anonymized dataset, not a pruner of syntax errors.For executives. This is deploy insurance, not a feature — and it's cheap. Today our only defence against a broken schema change is code review plus hoping staging matches production. When that fails, we get downtime, an incident, and a rollback scramble; when it works, it's invisible. Pre-validating migration SQL before it touches production is a well-understood practice that converts a class of avoidable outage into a failed CI check. I would not adopt this specific package as a dependency — it's archived, unsupported on Laravel 12, and has zero downstream users — but the practice is worth a few days of engineering time: either a small internal equivalent or a forked version we own. The deliverable is a pipeline gate, not a vendor. Cost is days, not weeks, plus one sandbox database. The framing to hold onto: this reduces the blast radius of our riskiest routine engineering activity, and it's the kind of thing that only gets funded after an outage unless we fund it now.
For engineering. tightenco/quicksand is a pre-deploy migration sandbox — run pending migrations somewhere safe, inspect the SQL and any errors, then apply for real. It's MIT, small, archived as of March 2024, and supports Laravel up to 11. Don't take it as a load-bearing dependency. Instead: read the source first to resolve the conflicting descriptions, confirm the execution model against our engine, then either fork it or write a thin equivalent (a dedicated sandbox connection, a command that runs pending migrations and reports SQL/errors, and a sanity assertion that refuses to boot if the sandbox DB name equals DB_DATABASE). Wire it as a required CI check on PRs touching database/migrations/** using a service container, and as a gate immediately before migrate --force in the deploy script — pipeline enforcement, not developer discipline. Two caveats to design around: a green sandbox means the migration valid, not safe (locks and data volume are out of scope), and the sandbox connection needs its own credentials, separate from the production user's grants. Name an owner; if we fork it, it's production tooling and needs a maintainer.
How can I help you explore Laravel packages today?