Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel 5.5 Class 'Doctrine\DBAL\Driver\PDOPgSql\Driver' not found

I am working in laravel 5.5 with postgras 9.6, I manage to run all migration and rollback, but when I want to run migration for rename a column in Table i get the Class 'Doctrine\DBAL\Driver\PDOPgSql\Driver' not found error, hire is migration file:

class CreateRenameApplicantIdInBillToApplicationId extends Migration

{

public function up()
{

    Schema::table('bill_bills', function($table) {
        $table->renameColumn('applicant_id', 'application_id');
    });
}

/**
 * Reverse the migrations.
 *
 * @return void
 */
public function down()
{
    Schema::table('bill_bills', function($table) {
        $table->renameColumn('applicantion_id', 'applicant_id');
    });
}

}

Any help would be appreciated.

like image 269
Joshua Kisanga Avatar asked Dec 06 '22 12:12

Joshua Kisanga


2 Answers

To renaming columns Laravel 5.x, you need to require doctrine/dbal package in your composer.json file.

composer require doctrine/dbal

I think this will help you. Thanks.

like image 185
Janaka Pushpakumara Avatar answered Dec 11 '22 12:12

Janaka Pushpakumara


For PHP 7 in Linux you can install driver via

sudo apt-get install php7.0-pgsql

like image 37
Naveen DA Avatar answered Dec 11 '22 12:12

Naveen DA