laravel - 迁移时出错 :: 在 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)已启用。
仅当我尝试迁移命令时才会触发此错误。所有其他功能都运行良好。
解决方案
推荐阅读
- java - Google App Engine 无法启动 Dataflow 作业
- c++ - 使用 [] 访问字符串元素会打印随机结果
- r - 计算 r 中每个患者的持续时间
- javascript - 如何使用来自 Ajax JQuery 的响应更新 html 元素
- python - 使用pandas DataFrame 比较两个file_csv 找出差异并将F2 加入F1
- php - 函数内array_push(mainArr,subAssociativeArr)的PHP问题
- powerbi - 计算累计总计时如何提取月份
- python - 如何从 django 中的预先编写的视图中删除 put
- format - 首次使用时,MIFARE Ultralight 上的 OTP 页面是否应该为空?
- html - 如何删除活动li选项卡上的边框