diff --git a/migrations.md b/migrations.md index 34499bb1c23..2d40e5cecda 100644 --- a/migrations.md +++ b/migrations.md @@ -134,6 +134,21 @@ public function up(): void } ``` + +#### Skipping Migrations + +Sometimes a migration might be meant to support a feature that is not yet active and you do not want it to run yet. In this case you may define a `shouldRun` method on the migration. If the `shouldRun` method returns `false`, the migration will be skipped: + +```php +/** + * Determine if this migration should run. + */ +public function shouldRun(): bool +{ + return Feature::active(Flights::class); +} +``` + ## Running Migrations