laravel voyager 很酷,但是如何将这些表\设置\面包从开发迁移到产品实例?尤其是一次开发,多次部署,如何优雅地完成?
对于 Laravel, native 数据库迁移/播种机适用于此目的
最佳答案
我建议使用 3rd 方工具从现有的数据库表中生成迁移和种子。
生成迁移:https://github.com/Xethron/migrations-generator
生成种子:https://github.com/orangehill/iseed
像 DataRowsTableSeeder.php 这样的文件已经由 Voyager 创建了 -
Iseed 会想要覆盖它们。如果您不能接受,我创建了一个 fork+pull 请求,它允许您在运行 Iseed 时明确指定文件/类名:https://github.com/mattrabe/iseed
关于laravel - 如何将航海者的东西迁移到新的部署实例?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45957609/