tursodatabase / turso-driver-laravel

Turso Driver for Laravel with Native libSQL
https://turso.tech/sdk/php/guides/laravel
MIT License
59 stars 6 forks source link

[Bug]: Undefined array key "rows" #2

Closed mpociot closed 3 months ago

mpociot commented 3 months ago

What happened?

When running php artisan migrate:fresh an exception gets thrown:

Undefined array key "rows"

at vendor/tursodatabase/turso-driver-laravel/src/Database/LibSQLSchemaBuilder.php:51
     47▕     protected function dropAllTriggers(): void
     48▕     {
     49▕         $statement = $this->connection->getPdo()->query($this->grammar()->compileDropAllTriggers());
     50▕
  ➜  51▕         collect($statement['rows'])->each(function (array $query) {
     52▕             $this->connection->select($query[0]);
     53▕         });
     54▕     }
     55▕

How to reproduce the bug

Setup a Laravel project to use the Turso Laravel driver and run php artisan migrate:fresh

Package Version

^1.0

PHP Version

8.3.8

Laravel Version

11.10.0

Which operating systems does with happen with?

macOS

Notes

No response

darkterminal commented 3 months ago

Thank you for reporting this issue... I will check it and fix it. Sorry for late response.

darkterminal commented 3 months ago

Hi @mpociot I just fix the migration. You can update to latest version 🎉