Command Failed - Application in Production
Some migration operations are destructive, which means they may cause you to lose data. As all Laravel Cloud environments default to APP_ENV=production
, you may run into issues running migrations in an ad-hoc manner using the “Commands” tab from your environment panel. Since these commands do not support interactivity, the command will fail if it attempts to prompt you for input. This happens most commonly when attempting to run migrations in a production environment. This is a safety feature of Laravel to prevent unexpected data loss.
If you are comfortable with the risks associated with running migrations in a production environment, you may append the --force
flag on your command to bypass the production environment warning.
Related commands which may also require the --force
flag include:
Customizing Your APP_ENV
If you are working on non-production environment, you may consider overwriting your APP_ENV
environment variable in your environment’s Custom Environment Variables to better match your environment’s purpose. Non-production environments will not trigger the same warnings as described above.
Was this page helpful?