1

I'm trying to follow the upgrade guide to Vapor 4 with my Vapor 3 project. I have used the Vapor 3 automatic model migrations a lot. But going through the Vapor 4 upgrade guide, they aren't mentioned anymore, in fact they use specific migrations for every model. So, don't they exist anymore?

4

1 回答 1

3

据我所知,有两种选择(感谢@vzsg)

  • 您可以将--auto-migrate参数传递给进程(在命令行中快速运行 Run serve --auto-migrate,并通过 Xcode 中的 Edit Scheme)
  • 您可以手动调用并等待迁移try app.autoMigrate().wait()
于 2020-05-05T08:32:09.267 回答