deployer icon indicating copy to clipboard operation
deployer copied to clipboard

[Symfony] database:migrate should only be executed once

Open Mika56 opened this issue 2 years ago • 1 comments

Because database:migration task alters the database, it should only be executed once, not by every host.

As such, ->once() should be called when defining the task

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar

Mika56 avatar Sep 13 '23 16:09 Mika56

Well, it depends.

You can do it by adding in your deploy.php:

task('database:migration')->once();

antonmedv avatar Sep 13 '23 17:09 antonmedv