2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

Laravelでマイグレーションしようとすると「Class "Doctrine\DBAL\Driver\AbstractMySQLDriver" not found」と出る

Posted at

備忘録として。

エラー内容

テーブルのカラム内容を変更しようとして、変更用のマイグレーションファイルを作成しました。
しかし、マイグレーションを実行しようとするとなぜかそこファイルだけ実行時にコケてしまう。

$ php artisan migrate
Migrating: 2022_01_11_205136_change_work_statuses_table_column

   Error 

  Class "Doctrine\DBAL\Driver\AbstractMySQLDriver" not found

  at vendor/laravel/framework/src/Illuminate/Database/PDO/MySqlDriver.php:8

解決策

該当のライブラリを新しくする

$ composer require doctrine/dbal

再度マイグレーションを行う

$ php artisan migrate
Database seeding completed successfully.

2
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?