singlestore-labs / singlestoredb-laravel-driver

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

New Laravel update broke the whole package #75

Closed larskoole closed 11 months ago

larskoole commented 11 months ago

Laravel changed the way they create tables with primary keys. I don't know the specifics but it's currently not possible to migrate anything if it contains a primary key.

When including a primary key on any column (in our case id) it throws an exception.

SQLSTATE[HY000]: General error: 1851 COLUMNAR indexes and SKIPLIST indexes cannot be used on the same table (Connection: singlestore, SQL: create table `users` (`id` char(26) not null, `first_name` longtext not null, primary key `users_id_primary`(`id`), sort key(`id` asc), primary key (`id`)) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

It doesn't work if there is a primary key defined in the migration. It does work if a shardKey() is defined and no primary key is defined.

larskoole commented 11 months ago

Update: Laravel reverted the change: https://github.com/laravel/framework/pull/49392#issuecomment-1864561219