Skip to content

Commit fda374d

Browse files
authored
A few adjustments to documentation on Migrations (#10947)
* docs: use proper naming convention for model Flight * docs: add link to Isolating Migration Execution section
1 parent 4da19a5 commit fda374d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

migrations.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,15 +140,15 @@ public function up(): void
140140
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:
141141

142142
```php
143-
use App\Models\Flights;
143+
use App\Models\Flight;
144144
use Laravel\Pennant\Feature;
145145

146146
/**
147147
* Determine if this migration should run.
148148
*/
149149
public function shouldRun(): bool
150150
{
151-
return Feature::active(Flights::class);
151+
return Feature::active(Flight::class);
152152
}
153153
```
154154

@@ -173,6 +173,7 @@ If you would like to see the SQL statements that will be executed by the migrati
173173
php artisan migrate --pretend
174174
```
175175

176+
<a name="isolating-migration-execution"></a>
176177
#### Isolating Migration Execution
177178

178179
If you are deploying your application across multiple servers and running migrations as part of your deployment process, you likely do not want two servers attempting to migrate the database at the same time. To avoid this, you may use the `isolated` option when invoking the `migrate` command.

0 commit comments

Comments
 (0)