π§© Laravel Migration Linter
βSmart developers donβt debug production β they lint migrations.β
π‘ Overviewβ
Laravel Migration Linter is a lightweight developer tool that automatically scans your database migrations for risky schema changes before they hit production.
It acts as a static analyzer for your migrations β preventing downtime, data loss, or broken deploys by catching unsafe patterns early in your CI/CD pipeline.
π Key Featuresβ
- π§ Safety-first linting β Detects dangerous operations like adding non-nullable columns without defaults or dropping columns.
- β‘ Performance awareness β Warns when missing indexes, column renames, or inefficient data types can impact query speed.
- πΎ Data integrity checks β Alerts when unique constraints, float columns, or type changes may corrupt data.
- π Downtime prevention β Detects column renames and operations that cause table locks on production databases.
- π§© Configurable rules β Enable, disable, or adjust severity (
info,warning,error) per project. - π§± Baseline support β Ignore known legacy issues and focus only on new violations.
- π Developer-friendly reports β Colorized console output, JSON export, and compact mode.
- π€ CI/CD ready β Integrates cleanly with GitHub Actions, GitLab, and other pipelines.
- ποΈ SOLID Architecture (v2.0.0) β Extensible with dependency injection, custom formatters, and services.
- π‘ Actionable Suggestions β Every warning includes fix recommendations and documentation links.
π§° Why Use Itβ
Traditional Laravel migrations execute directly on production data β even small mistakes can cause downtime.
Laravel Migration Linter analyzes migrations before they run, letting you:
- Prevent table locks and schema conflicts
- Detect destructive operations in pull requests
- Enforce safe migration practices across teams
- Standardize schema evolution in CI/CD workflows
πΈ Example Reportsβ
Screenshot from v2.1.0 β Interactive HTML report with charts, filtering, and search functionality
Screenshot from v2.1.0 β showing lint warnings with flag check_all_tables => true in console output
π§ Next Stepsβ
- π¦ Installation Guide β Learn how to install and publish config
- π§© Usage β See command options and examples
- βοΈ Configuration β Customize rule severities
- π§ Writing Custom Rules β Create your own organization-specific checks
- π€ CI/CD Integration β Enforce linting in automated pipelines
Β© 2025 Sufyan β Released under the MIT License.