{"repo":"malikad778/Laravel-migration-guard","free":true,"listed":false,"github":"https://github.com/malikad778/Laravel-migration-guard","clone":"git clone https://github.com/malikad778/Laravel-migration-guard.git","description":"Catch dangerous Laravel migrations before they reach production. Static analysis, zero config. The strong_migrations equivalent for Laravel.","language":"PHP","stars":18,"topics":["artisan","ci-cd","database","database-migrations","developer-tools","devops","laravel","laravel-migration","laravel-package","migrations"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"🛡️ laravel-migration-guard Catch dangerous database migrations before they reach production. The strong migrations equivalent for Laravel. Static analysis. Zero configuration. Framework-native. --- The Problem Every Laravel team doing zero-downtime deployments has eventually had a migration incident. These operations succeed without errors in development , then cause production outages anywhere from immediately to hours later: Operation What breaks in production --- --- dropColumn() Old app instances still query the dropped column — immediate DB errors during the deployment window NOT NULL without default Full table rewrite on MySQL truncate() inside a migration add column not null 🟡 HIGH Column added without - nullable() or - default() change column type 🟡 HIGH - change() modifying an existing column type add index 🔵 MEDIUM Index added to a critical or large table --- Check Details & Safe Alternatives Drop Column — BREAKING Why: During a zero-downtime deployment, old app instances run alongside the new schema. Any query touching the dropped column fails immediately with a database error. Safe approach: 1. Deploy 1: Remove all code references to the column (models, queries, $fillable , $casts ) 2. Deploy 2: Drop the column after confirming no running instance references it --- Add NOT NULL Column Without Default — HIGH Why: MySQL nullable() (instant, no lock) 2. Backfill existing rows: User::whereNull('status')- update(['status' = 'active']) 3. Add the NOT NULL constraint","default_branch":null,"files":null,"tree":[],"storefront":"/r/malikad778","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/malikad778/Laravel-migration-guard/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}