singlestore-labs / singlestoredb-laravel-driver

The official SingleStore Laravel driver.
https://github.com/singlestore-labs/singlestore-laravel-driver
Apache License 2.0
223 stars 22 forks source link

Fix column modifying on columnstore tables #88

Closed hafezdivandari closed 1 month ago

hafezdivandari commented 1 month ago

Fixes #39

Add support for modifying columns on

Note 1: On Laravel 10.x, You have to call Schema::useNativeSchemaOperationsIfPossible() method within the boot method of your App\Providers\AppServiceProvider class. Not needed on Laravel 11.x

Note 2: I'm not sure how Singlestore handles indexes and foreign keys of the column being modified, couldn't find anything related on the docs.

AdalbertMemSQL commented 1 month ago

It looks like Schema::getColumnType requires Doctrine\DBAL\Driver\AbstractMySQLDriver for 10.0.0 version of Laravel. But from 10.30.0 it works well (https://github.com/laravel/framework/pull/48357 )

hafezdivandari commented 1 month ago

@AdalbertMemSQL yeah I fixed that function on Laravel 10.30, it was using Doctrine DBAL before that. We can limit that assertion to latest version maybe?

AdalbertMemSQL commented 1 month ago

Yep, that sounds like a good solution