BUG: $connection property ignored in migrations #38783
-
Bug Report
Description:The documentation states that you can "set the database connection that should be used by the migration" by invoking the Steps To Reproduce:
The migration should use the connection specified in the @driesvints I've made a video showing the issue: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I've tested it and it work :
|
Beta Was this translation helpful? Give feedback.
-
The $connection property does seems to be transmitted to the Illuminate/Database/Schema/Blueprint::build method i don't know the intended behaviour, but there is no way to transmit that value to the builder currently the only thing that make it work is to do :
the laravel doc does not seems to state that it should work that way https://laravel.com/docs/8.x/migrations#database-connection-table-options the only use of $connection seems to be for the transaction |
Beta Was this translation helpful? Give feedback.
The $connection property does seems to be transmitted to the Illuminate/Database/Schema/Blueprint::build method
i don't know the intended behaviour, but there is no way to transmit that value to the builder currently
the only thing that make it work is to do :
the laravel doc does not seems to state that it should work that way
https://laravel.com/docs/8.x/migrations#database-connection-table-options
the only use of $connection seems to be for the transaction