You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I clone my project to a new dev machine and run migrations (fresh, no database)
I get error on create_permissions_table migration file
2024_05_18_145302_create_permission_tables ..................... 2s FAIL
Error
Call to a member function prepare() on null
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:592
588▕
589▕ // For update or delete statements, we want to get the number of rows affected
590▕ // by the statement and return that back to the developer. We'll first need
591▕ // to execute the statement and then we'll use PDO to fetch the affected.
➜ 592▕ $statement = $this->getPdo()->prepare($query);
593▕
594▕ $this->bindValues($statement, $this->prepareBindings($bindings));
595▕
596▕ $statement->execute();
+7 vendor frames
8 database/migrations/2024_05_18_145302_create_permission_tables.php:118
Illuminate\Cache\Repository::forget()
+26 vendor frames
35 artisan:13
Illuminate\Foundation\Application::handleCommand()
zaid@HO-IT-ZAID:~/LaravelQuiz$
I tried to reproduce it with a new laravel / filament / filament shield project - the error came up once and then didnt - I was trying migration again and again with new db etc.
I am using Ubuntu 24.04 on WSL on Windows 11
I have tried both sqlite and mysql databases
If I dont run create_permissions_table migration and run everything else and THEN run create_permissions_table migration it works and no error is thrown.
I will try to give proper reproduction steps, but if there is anything I can do to fix this, would be great - its an inconvinience, as I can still run it - just that doesnt work on first run and need to rename create_permissions_table migration, then run all my migrations first and then run the create_permissions_table later after renaming it back
The text was updated successfully, but these errors were encountered:
Hello,
When I clone my project to a new dev machine and run migrations (fresh, no database)
I get error on create_permissions_table migration file
I tried to reproduce it with a new laravel / filament / filament shield project - the error came up once and then didnt - I was trying migration again and again with new db etc.
I am using Ubuntu 24.04 on WSL on Windows 11
I have tried both sqlite and mysql databases
If I dont run create_permissions_table migration and run everything else and THEN run create_permissions_table migration it works and no error is thrown.
in this case, the refresh migrate also works - once if the create_permissions_table works, then if I refresh - it works again
I will try to give proper reproduction steps, but if there is anything I can do to fix this, would be great - its an inconvinience, as I can still run it - just that doesnt work on first run and need to rename create_permissions_table migration, then run all my migrations first and then run the create_permissions_table later after renaming it back
The text was updated successfully, but these errors were encountered: