Skip to content

Conversation

@bleepblorb
Copy link
Contributor

The current implementation determines the database driver from the default database configuration file. This can cause issues when a model uses a database that is different from the default. This pull request fixes this by determining the driver based on the model configuration, using methods built into the framework.

$driver = $table->getConnection()->getDriverName();

I believe this to be a fix that brings it into alignment with expectations, but there's a slim chance it could cause breaking changes if people were relying on the existing behavior.

I was unable to get the tests running on a fresh Laravel project and therefore did not check existing tests or add an additional test for this use case. In practice, it was working for me though.

@mavinoo mavinoo merged commit 3fc44da into mavinoo:master Nov 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants