找不到Laravel 5.5类'Doctrine \ DBAL \ Driver \ PDOPgSql \ Driver'

Jos*_*nga 2 php migration laravel-5.5

我在使用postgras 9.6的laravel 5.5中工作,我设法运行所有迁移和回滚,但是当我想运行迁移以重命名Table中的列时, Class 'Doctrine\DBAL\Driver\PDOPgSql\Driver' not found出现错误,请使用迁移文件:

class CreateRenameApplicantIdInBillToApplicationId extends Migration
Run Code Online (Sandbox Code Playgroud)

{

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');
    });
}
Run Code Online (Sandbox Code Playgroud)

}

任何帮助,将不胜感激。

Jan*_*ara 6

要重命名Laravel 5.x列,您需要在composer.json文件中要求doctrine / dbal包。

composer require doctrine/dbal

我认为这会对您有所帮助。谢谢。