Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Configuration in database.php for "Transaction isolation level" #2228

Closed
duxthefux opened this issue May 5, 2020 · 5 comments
Closed

Configuration in database.php for "Transaction isolation level" #2228

duxthefux opened this issue May 5, 2020 · 5 comments

Comments

@duxthefux
Copy link

Hi,

we currently ran into the situation where we need to set the transaction isolation level for mysql.

We implemented it and thought maybe it makes sense to bring that into laravel core, as laravel currently lacks that possibility, whereas Doctrine provides that possibility.

We currently configure it in database.php

return [
    'connections' => [
          'default' => [
                ...
               'host' => env('DB_HOST'),
               ...
               'isolation_level' => env('DB_ISOLATION_LEVEL', 'REPEATABLE READ'),
              ....
            ]
      ]
];

I could prepare a pull request if it makes sense.

Best

@jorgcastellano
Copy link

I'm interested in know if it works, this

@mfn
Copy link

mfn commented Jun 13, 2020

I'd say go for a PR; many of these options have been merged (e.g. new addition in \Illuminate\Database\Connectors\MySqlConnector::connect maybe).

@duxthefux
Copy link
Author

@mfn created PR laravel/framework#33783

@duxthefux
Copy link
Author

PR got merged

@mfn
Copy link

mfn commented Aug 10, 2020

@duxthefux congratulations 😄

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants