RatkoR / laravel-crate.io

Crate.io driver for Laravel
MIT License
36 stars 12 forks source link

cannot change database #38

Open evan2579429110 opened 3 years ago

evan2579429110 commented 3 years ago

I tried to use a different schema, but found it was not supported。 I should have changed it to this (ratkor/laravel-crate.io/src/RatkoR/Crate/Connectors/Connector.php:77 and ratkor/laravel-crate.io/src/RatkoR/Crate/Connectors/Connector.php:102) image image

image

RatkoR commented 3 years ago

Yes, you're right. Currently we connect to the default doc schema.

I'd welcome a PR that adds this. Just do what you did in your example but with isset() test (look at $port and $host). Send $database parameter to getMultipleHostsDsn() method because there is no $config variable there.

And make sure the default database is set to doc for backwards compatibility.