Migrations can be pretended but the events have no idea #48801
Unanswered
willpower232
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
You can run
php artisan migrate --pretend
which outputs the raw SQL from the migrations rather than executing them.framework/src/Illuminate/Database/Migrations/Migrator.php
Line 169 in 7132603
The problem is this extra context is not added to the events issued in the same function.
framework/src/Illuminate/Database/Migrations/Migrator.php
Line 173 in 7132603
framework/src/Illuminate/Database/Migrations/Migrator.php
Line 188 in 7132603
This means if you have database-altering code relying on these events, they could throw exceptions or cause errors in production.
Presumably adding the pretend flag to the events is not a big issue but I don't know if it would be worth passing the whole
$options
array in for other use cases I was not previously aware of?Beta Was this translation helpful? Give feedback.
All reactions