Download the PHP package idkwhoami/migration-rules without Composer
On this page you can find all versions of the php package idkwhoami/migration-rules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download idkwhoami/migration-rules
More information about idkwhoami/migration-rules
Files in idkwhoami/migration-rules
Download idkwhoami/migration-rules
More information about idkwhoami/migration-rules
Files in idkwhoami/migration-rules
Vendor idkwhoami
Package migration-rules
Short Description Enforce consistent Laravel migration naming and ordering via topological sort, inlining, and regeneration.
License MIT
Package migration-rules
Short Description Enforce consistent Laravel migration naming and ordering via topological sort, inlining, and regeneration.
License MIT
Please rate this library. Is it a good library?
Informations about the package migration-rules
Migration Rules
A composer require --dev package that scans, sorts, inlines, and regenerates Laravel migrations to enforce consistent naming and ordering rules.
Warning: Safe to run only on undeployed apps. This tool modifies your migration files.
Requirements
- Laravel 12+ (anonymous class migration convention)
- PHP 8.2+
Installation
Usage
Options
| Option | Description | Default |
|---|---|---|
--dry-run |
Preview changes without writing files | false |
--pattern |
Date prefix for filenames | 0001_01_01 |
--base-step |
Slot step for base migrations | 50 |
--pivot-step |
Slot step for pivot migrations | 25 |
--force |
Auto-resolve collisions (keep base version) | false |
--status |
Show manifest state | false |
Rules
- Filename pattern:
{prefix}_{slot}_{action}.php - Base slot step: 50 (each distinct model)
- Pivot slot step: 25
- Ordering: Topological sort by FK dependencies
- Altering migrations: Inlined into base migration (no separate altering migrations)
- down(): Omitted entirely (undeployed = no rollback needed)
FK Detection
Detects foreign keys via:
->foreignId('column')->constrained()->foreignIdFor(Model::class)->foreignUlid('column')/->foreignUuid('column')->morphs('column')/->nullableMorphs()/->ulidMorphs()/->uuidMorphs()->constrained()->onDelete(...)
External table references (tables outside database/migrations/) are skipped.
Manifest
After running, a .migration.rules file is written to your project root and added to .gitignore. This allows subsequent runs to detect drift.
License
MIT
All versions of migration-rules with dependencies
PHP Build Version
Package Version
The package idkwhoami/migration-rules contains the following files
Loading the files please wait ...