You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Retrying failed jobs via "php artisan queue:retry all" results in system database connection being used instead of tenant databse connection.
Actual behavior
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'SYSTEM.messages' doesn't exist (SQL: select * from messages where messages.id = 1554856 limit 1)
Expected behavior
The tenant databse connection should be used.
use Hyn\Tenancy\Traits\UsesTenantConnection is being ignored in the model.
Information
hyn/multi-tenant version: 5.8.0
laravel version: 8
database driver and version: mariadb
php version: 8.2
Error log
php artisan queue:retry all
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sc4.messages' doesn't exist (SQL: select * from messages where messages.id = 1554856 limit 1)
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }
Description
Retrying failed jobs via "php artisan queue:retry all" results in system database connection being used instead of tenant databse connection.
Actual behavior
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'SYSTEM.messages' doesn't exist (SQL: select * from
messages
wheremessages
.id
= 1554856 limit 1)Expected behavior
The tenant databse connection should be used.
use Hyn\Tenancy\Traits\UsesTenantConnection is being ignored in the model.
Information
Error log
php artisan queue:retry all
Illuminate\Database\QueryException
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sc4.messages' doesn't exist (SQL: select * from
messages
wheremessages
.id
= 1554856 limit 1)at vendor/laravel/framework/src/Illuminate/Database/Connection.php:712
708▕ // If an exception occurs when attempting to run a query, we'll format the error
709▕ // message to include the bindings with SQL, which will make this exception a
710▕ // lot more helpful to the developer instead of just the database's errors.
711▕ catch (Exception $e) {
➜ 712▕ throw new QueryException(
713▕ $query, $this->prepareBindings($bindings), $e
714▕ );
715▕ }
716▕ }
• A table was not found: You might have forgotten to run your migrations. You can run your migrations using
php artisan migrate
.https://laravel.com/docs/master/migrations#running-migrations
1 [internal]:0
App\Jobs\SendMessage::__unserialize()
18 [internal]:0
App\Jobs\SendMessage::__unserialize()
The text was updated successfully, but these errors were encountered: