首页 > 解决方案 > 迁移时出错 :: 在 MacOS 上找不到驱动程序

问题描述

我已经将我的 Laravel 项目从 Windows 移到了 MacOS,并且它可以完美地连接到 PostgreSQL 数据库。

但是当运行“php artisan migrate”命令时,它显示以下错误消息

找不到驱动程序 (SQL: select * from information_schema.tables where table_schema = public and table_name = migrations and table_type = 'BASE TABLE')

当我检查 phpInfo(我使用的是 PHP 7.3.27)时,它显示 PostgreSQL 的 PDO 驱动程序(pdo_pgsql)已启用。

仅当我尝试迁移命令时才会触发此错误。所有其他功能都运行良好。

标签: laravellaravel-7

解决方案


推荐阅读