1
votes

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?

1

1 Answers

3
votes

As far as I know there are two options (credits to @vzsg)

  • you can pass an --auto-migrate parameter to the process (swift run Run serve --auto-migrate in the command line, and via Edit Scheme in Xcode)
  • you can manually call and wait for migrations try app.autoMigrate().wait()