Few days ago, i was working on my laravel 5 application and i created some tables using migrations that i required. After sometime i need to change "name" column into "fullname" in users table. I simple created migration for rename of column, But when i run that migration using bellow command:
php artisan migrate
I found bellow error when i run above command:
[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found
I thought why this type error comes, even i used same syntax of laravel docs. Finally i found we require to install "doctrine/dbal" package for solving this error. without doctrine/dbal package we can not user rename column name. So i run bellow command for install doctrine/dbal package.
composer require doctrine/dbal
after install successfully, run again migration, it works!!!
If you also have this error, try this....
Do you like below Tutorials ?
- PHP Laravel 5.5 - import export data into excel and csv using maatwebsite
- Laravel 7.x and 6.x create custom facade example from scratch
- Node JS - Get Real time online users counter using socket io example
- PHP Laravel 7.x and 6.x - Bootstrap Admin Theme Integration example from scratch
- MySQL Query - How to select records of today to next Sunday ?
- Laravel 7.x and 6.x - username custom validation example
- Laravel 5.5 - Import Extract zip file using chumper/zipper package
- PHP Laravel Set Custom Validation Error Messages Example