Migrations for Symfony or Laravel

How do you manage your db migrations during install for PHP scripts? (Symfony, Laravel, etc)

Do you provide a page to install application or do you expect your client to run migration commands from console? (e.g. php bin/console doctrine:migrations:migrate)

Creating an installer might be a user friendly good idea, but shipping product with such an interface makes me uncomfortable about security. Meanwhile I’m not sure if expecting client to run a command too much? Not sure.

Third idea is to provide final SQL file, and disable migrations for production.

I would personally suggest that you ship a web-based installer with your app, as it is by far the easiest method of installation for buyers. You can have it disable the installer script once the product has been installed.

1 Like