我正在设置我的第一个 Laravel Forge 服务器。一切似乎都很顺利,代码已从我的 Git 存储库中提取,我可以在线查看我的网站。由于某种原因,数据库迁移不起作用。
当我通过 Forge 运行“部署”命令时,我在 Forge 事件日志中看到的错误是:
From repohost:myusername/myrepo
* branch master -> FETCH_HEAD
Already up-to-date.
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Nothing to install or update
Generating autoload files
Generating optimized class loader
Compiling common classes
Compiling views
Migration table created successfully.
[RuntimeException]
Aborted
migrate [--bench[="..."]] [--database[="..."]] [--force] [--path[="..."]] [--package[="..."]] [--pretend] [--seed]
我尝试通过终端运行migrate
(and migrate:refresh
) 命令,但它只是挂起,我最终必须按 CTRL-C 退出(即使在使用 时--verbose
)。当我之后检查数据库时,只创建了迁移表,它是空的。
我还尝试在我的开发环境(Homestead)上重新运行我的所有迁移,它们工作正常。
有谁知道这可能是什么原因造成的?