I'm using laravel 5.1 , I'm trying to do a migrate:refresh, I get an error :
Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found in ../vendor/laravel/framework/src/Illuminate/Database/SQLiteConnection.php
[Symfony\Component\Debug\Exception\FatalErrorException] Class 'Doctrine\DBAL\Driver\PDOSqlite\Driver' not found
Doctrine/dbal is already required in my composer.json
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"Doctrine/dbal": "^2.5"
}
So I want to ask what is wrong in my laravel project.
From the official docs:
Before modifying a column, be sure to add the doctrine/dbal dependency to your composer.json file. The Doctrine DBAL library is used to determine the current state of the column and create the SQL queries needed to make the specified adjustments to the column:
composer require doctrine/dbal
What worked for me is to delete the database.sqlite file and create an empty one.
I know this is not the best solution, but it fixed the issue in my use case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With